Skip to content
Snippets Groups Projects
Commit 5e7e966d authored by Johan Sundström's avatar Johan Sundström
Browse files

Fixed the ugly bugs I introduced. :-}

Rev: lib/modules/Protocols.pmod/HTTP.pmod/module.pmod:1.10
parent 0d110e15
No related branches found
No related tags found
No related merge requests found
...@@ -37,6 +37,8 @@ object get_url(string url,void|mapping query_variables, void|mapping request_hea ...@@ -37,6 +37,8 @@ object get_url(string url,void|mapping query_variables, void|mapping request_hea
string prot="http",host; string prot="http",host;
int port=80; int port=80;
string query; string query;
if(!request_headers)
request_headers = ([]);
sscanf(url,"%[^:/]://%[^:/]:%d/%s",prot,host,port,query) == 4 || sscanf(url,"%[^:/]://%[^:/]:%d/%s",prot,host,port,query) == 4 ||
(port=80,sscanf(url,"%[^:/]://%[^:/]/%s",prot,host,query)) == 3 || (port=80,sscanf(url,"%[^:/]://%[^:/]/%s",prot,host,query)) == 3 ||
...@@ -84,6 +86,8 @@ object post_url(string url,mapping query_variables, void|mapping request_headers ...@@ -84,6 +86,8 @@ object post_url(string url,mapping query_variables, void|mapping request_headers
string prot="http",host; string prot="http",host;
int port=80; int port=80;
string query; string query;
if(!request_headers)
request_headers = ([]);
sscanf(url,"%[^:/]://%[^:/]:%d/%s",prot,host,port,query) == 4 || sscanf(url,"%[^:/]://%[^:/]:%d/%s",prot,host,port,query) == 4 ||
(port=80,sscanf(url,"%[^:/]://%[^:/]/%s",prot,host,query)) == 3 || (port=80,sscanf(url,"%[^:/]://%[^:/]/%s",prot,host,query)) == 3 ||
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment