mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
[svn] Allow trailing whitespace in Set-Cookies. Also allow empty Set-Cookies
without spewing an error. Message-ID: <m365jucpci.fsf@xemacs.org>.
This commit is contained in:
parent
5e2f4ee878
commit
3abcd16d79
@ -1,3 +1,10 @@
|
|||||||
|
2003-09-15 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
|
* cookies.c (parse_set_cookies): Allow trailing space in
|
||||||
|
set-cookies header. Also, allow any amount of whitespace, not
|
||||||
|
only one character. Allow empty set-cookies header without
|
||||||
|
spewing an error.
|
||||||
|
|
||||||
2003-09-14 Hrvoje Niksic <hniksic@xemacs.org>
|
2003-09-14 Hrvoje Niksic <hniksic@xemacs.org>
|
||||||
|
|
||||||
* url.c (append_uri_pathel): Use opt.restrict_file_names when
|
* url.c (append_uri_pathel): Use opt.restrict_file_names when
|
||||||
|
@ -466,15 +466,17 @@ parse_set_cookies (const char *sc)
|
|||||||
const char *name_b = NULL, *name_e = NULL;
|
const char *name_b = NULL, *name_e = NULL;
|
||||||
const char *value_b = NULL, *value_e = NULL;
|
const char *value_b = NULL, *value_e = NULL;
|
||||||
|
|
||||||
FETCH (c, p);
|
|
||||||
|
|
||||||
while (state != S_DONE && state != S_ERROR)
|
while (state != S_DONE && state != S_ERROR)
|
||||||
{
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case S_NAME_PRE:
|
case S_NAME_PRE:
|
||||||
if (ISSPACE (c))
|
/* Strip whitespace preceding the name. */
|
||||||
FETCH (c, p);
|
do
|
||||||
|
FETCH1 (c, p);
|
||||||
|
while (c && ISSPACE (c));
|
||||||
|
if (!c)
|
||||||
|
state = S_DONE;
|
||||||
else if (ATTR_NAME_CHAR (c))
|
else if (ATTR_NAME_CHAR (c))
|
||||||
{
|
{
|
||||||
name_b = p - 1;
|
name_b = p - 1;
|
||||||
@ -589,13 +591,7 @@ parse_set_cookies (const char *sc)
|
|||||||
state = S_ERROR;
|
state = S_ERROR;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
state = S_NAME_PRE;
|
||||||
if (c)
|
|
||||||
FETCH1 (c, p);
|
|
||||||
if (!c)
|
|
||||||
state = S_DONE;
|
|
||||||
else
|
|
||||||
state = S_NAME_PRE;
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case S_DONE:
|
case S_DONE:
|
||||||
|
Loading…
Reference in New Issue
Block a user