1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Don't expect HTTP paths to begin with '/'.

Published in <sxsvgfrv7ky.fsf@florida.arsdigita.de>.
This commit is contained in:
hniksic 2001-11-30 21:22:17 -08:00
parent 92b269acad
commit 57dd93f915
2 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -869,13 +869,20 @@ find_matching_chains (const char *host, int port,
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