In case of get_destination_from_https_headers() it's important
to get stable hashes for certificates.
In case of get_destination_from_headers() and parse_http_url()
it's mainly cosmetic.
return JB_ERR_PARSE;
}
- p = strdup_or_die(host);
+ p = string_tolower(host);
+ if (p == NULL)
+ {
+ return JB_ERR_MEMORY;
+ }
chomp(p);
q = strdup_or_die(p);
return JB_ERR_PARSE;
}
- p = strdup_or_die(host);
+ p = string_tolower(host);
+ if (p == NULL)
+ {
+ return JB_ERR_MEMORY;
+ }
chomp(p);
q = strdup_or_die(p);
url_path
);
*url_path = '\0';
- http->hostport = strdup_or_die(url_noproto);
+ http->hostport = string_tolower(url_noproto);
}
else
{
* 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)