mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Minor tweak in path_matches in cookies.c.
This commit is contained in:
parent
57dd93f915
commit
3ff0a9ad00
@ -1,3 +1,8 @@
|
|||||||
|
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>
|
2001-12-01 Hrvoje Niksic <hniksic@arsdigita.com>
|
||||||
|
|
||||||
* cookies.c (path_matches): FULL_PATH doesn't begin with '/', but
|
* cookies.c (path_matches): FULL_PATH doesn't begin with '/', but
|
||||||
|
@ -871,12 +871,15 @@ path_matches (const char *full_path, const char *prefix)
|
|||||||
{
|
{
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
if (*prefix == '/')
|
if (*prefix != '/')
|
||||||
/* Our HTTP paths don't begin with /; do the same change to
|
/* Wget's HTTP paths do not begin with '/' (the URL code treats it
|
||||||
PREFIX. */
|
as a separator), but the '/' is assumed when matching against
|
||||||
++prefix;
|
the cookie stuff. */
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
++prefix;
|
||||||
len = strlen (prefix);
|
len = strlen (prefix);
|
||||||
|
|
||||||
if (0 != strncmp (full_path, prefix, len))
|
if (0 != strncmp (full_path, prefix, len))
|
||||||
/* FULL_PATH doesn't begin with PREFIX. */
|
/* FULL_PATH doesn't begin with PREFIX. */
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user