+2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
+
+ * cookies.c (path_matches): Return 0 if PREFIX doesn't begin with
+ '/'.
+
2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
* cookies.c (path_matches): FULL_PATH doesn't begin with '/', but
{
int len;
- if (*prefix == '/')
- /* Our HTTP paths don't begin with /; do the same change to
- PREFIX. */
- ++prefix;
+ if (*prefix != '/')
+ /* Wget's HTTP paths do not begin with '/' (the URL code treats it
+ as a separator), but the '/' is assumed when matching against
+ the cookie stuff. */
+ return 0;
+ ++prefix;
len = strlen (prefix);
+
if (0 != strncmp (full_path, prefix, len))
/* FULL_PATH doesn't begin with PREFIX. */
return 0;