X-Git-Url: http://www.privoxy.org/gitweb/?p=privoxy.git;a=blobdiff_plain;f=urlmatch.c;h=6949eedb82d2716f306ba8c0b73a2d4576813433;hp=124cc6ec310ec85bc5310a5eb31b80019854972d;hb=401c25dde61a9db0c47170bb213ae3e74252a0c2;hpb=34e92f5e777f9df0976372455ef772a8788a8152 diff --git a/urlmatch.c b/urlmatch.c index 124cc6ec..6949eedb 100644 --- a/urlmatch.c +++ b/urlmatch.c @@ -6,7 +6,7 @@ * patterns. * * Copyright : Written by and Copyright (C) 2001-2014 - * the Privoxy team. http://www.privoxy.org/ + * the Privoxy team. https://www.privoxy.org/ * * Based on the Internet Junkbuster originally written * by and Copyright (C) 1997 Anonymous Coders and @@ -87,7 +87,7 @@ void free_http_request(struct http_request *http) freez(http->url); freez(http->hostport); freez(http->path); - freez(http->ver); + freez(http->version); freez(http->host_ip_addr_str); #ifndef FEATURE_EXTENDED_HOST_PATTERNS freez(http->dbuffer); @@ -291,12 +291,17 @@ jb_err parse_http_url(const char *url, struct http_request *http, int require_pr /* * Got a path. * - * NOTE: The following line ignores the path for HTTPS URLS. - * This means that you get consistent behaviour if you type a - * https URL in and it's parsed by the function. (When the - * URL is actually retrieved, SSL hides the path part). + * If FEATURE_HTTPS_INSPECTION isn't available, ignore the + * path for https URLs so that we get consistent behaviour + * if a https URL is parsed. When the URL is actually + * retrieved, https hides the path part. */ - http->path = strdup_or_die(http->ssl ? "/" : url_path); + http->path = strdup_or_die( +#ifndef FEATURE_HTTPS_INSPECTION + http->ssl ? "/" : +#endif + url_path + ); *url_path = '\0'; http->hostport = strdup_or_die(url_noproto); } @@ -587,7 +592,7 @@ jb_err parse_http_request(const char *req, struct http_request *http) */ http->cmd = strdup_or_die(req); http->gpc = strdup_or_die(v[0]); - http->ver = strdup_or_die(v[2]); + http->version = strdup_or_die(v[2]); http->ocmd = strdup_or_die(http->cmd); freez(buf);