* Description : Splits the domain name so we can compare it
* against wildcards. It used to be part of
* parse_http_url, but was separated because the
- * same code is required in chat in case of
+ * same code is required in chat() in case of
* intercepted requests.
*
* Parameters :
/*
- * Split URL into protocol,hostport,path.
+ * Split URL into protocol, hostport, path.
*/
{
char *buf;
if (pattern == NULL) return;
freez(pattern->spec);
+
+ if (!(pattern->flags & PATTERN_SPEC_URL_PATTERN))
+ {
+ if (pattern->pattern.tag_regex)
+ {
+ regfree(pattern->pattern.tag_regex);
+ freez(pattern->pattern.tag_regex);
+ }
+ return;
+ }
+
#ifdef FEATURE_PCRE_HOST_PATTERNS
if (pattern->pattern.url_spec.host_regex)
{
regfree(pattern->pattern.url_spec.preg);
freez(pattern->pattern.url_spec.preg);
}
- if (pattern->pattern.tag_regex)
- {
- regfree(pattern->pattern.tag_regex);
- freez(pattern->pattern.tag_regex);
- }
}