debug_task ("found header \"%s\" with value \"%s\"", re->header, (const gchar *)cur->data);
rh = cur->data;
/* Try to match regexp */
- if (g_regex_match_full (re->regexp, rh->value, -1, 0, 0, NULL, &err) == TRUE) {
+ if (rh->value && g_regex_match_full (re->regexp, rh->value, -1, 0, 0, NULL, &err) == TRUE) {
if (G_UNLIKELY (re->is_test)) {
msg_info ("process test regexp %s for header %s with value '%s' returned TRUE", re->regexp_text, re->header, (const gchar *)cur->data);
}
const struct uri *u1 = a, *u2 = b;
gint r;
- if (u1->hostlen != u2->hostlen) {
+ if (u1->hostlen != u2->hostlen || u1->hostlen == 0) {
return u1->hostlen - u2->hostlen;
}
else {
if ((r = g_ascii_strncasecmp (u1->host, u2->host, u1->hostlen)) == 0){
- if (u1->userlen != u2->userlen) {
+ if (u1->userlen != u2->userlen || u1->userlen == 0) {
return u1->userlen - u2->userlen;
}
else {
const struct uri *u1 = a, *u2 = b;
int r;
- if (u1->hostlen != u2->hostlen) {
+ if (u1->hostlen != u2->hostlen || u1->hostlen == 0) {
return u1->hostlen - u2->hostlen;
}
else {