Published in <sxsvgfrv7ky.fsf@florida.arsdigita.de>.
+2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
+
+ * cookies.c (path_matches): FULL_PATH doesn't begin with '/', but
+ PREFIX does.
+
2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
* cookies.c (check_domain_match): Reimplement to match Netscape's
static int
path_matches (const char *full_path, const char *prefix)
{
- int len = strlen (prefix);
- if (strncmp (full_path, prefix, len))
+ int len;
+
+ if (*prefix == '/')
+ /* Our HTTP paths don't begin with /; do the same change to
+ PREFIX. */
+ ++prefix;
+
+ len = strlen (prefix);
+ if (0 != strncmp (full_path, prefix, len))
/* FULL_PATH doesn't begin with PREFIX. */
return 0;
/* Length of PREFIX determines the quality of the match. */
- return len;
+ return len + 1;
}
static int