X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=urlmatch.c;h=23a6b54363ef76250638ba13a27f40625146eb0a;hp=a028361e0c17dbb192db78f31fb8180d71606ec5;hb=d28c24b826ab49e1933b4e7c29e338634e745851;hpb=283e98e3f6ca776c1a15cd076e6ae1e999d8a6b3 diff --git a/urlmatch.c b/urlmatch.c index a028361e..23a6b543 100644 --- a/urlmatch.c +++ b/urlmatch.c @@ -45,7 +45,7 @@ #include #include -#if !defined(_WIN32) && !defined(__OS2__) +#if !defined(_WIN32) #include #endif @@ -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)