X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=urlmatch.c;h=23a6b54363ef76250638ba13a27f40625146eb0a;hp=4886e4c466500951c80e430fe8283eba1658427e;hb=46bd47c5e7003d28bf76adc31cd7a6a10f02f0d5;hpb=74f84988126c9680e5e05513a42016f0dbe6c185 diff --git a/urlmatch.c b/urlmatch.c index 4886e4c4..23a6b543 100644 --- a/urlmatch.c +++ b/urlmatch.c @@ -302,7 +302,7 @@ jb_err parse_http_url(const char *url, struct http_request *http, int require_pr url_path ); *url_path = '\0'; - http->hostport = strdup_or_die(url_noproto); + http->hostport = string_tolower(url_noproto); } else { @@ -311,10 +311,15 @@ jb_err parse_http_url(const char *url, struct http_request *http, int require_pr * or CONNECT requests */ http->path = strdup_or_die("/"); - http->hostport = strdup_or_die(url_noproto); + http->hostport = string_tolower(url_noproto); } freez(buf); + + if (http->hostport == NULL) + { + return JB_ERR_PARSE; + } } if (!host_available)