mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
Maintain the cookie value quoted if it was in the server response.
This commit is contained in:
parent
0b5b100fc9
commit
473ec526d2
@ -1,3 +1,9 @@
|
||||
2011-08-02 Giuseppe Scrivano <giuseppe@southpole.se>
|
||||
|
||||
* cookies.c (parse_set_cookie): If the value is quoted, do not modify
|
||||
it.
|
||||
Reported by: Nirgal Vourgère <jmv_deb@nirgal.com>
|
||||
|
||||
2011-07-29 Giuseppe Scrivano <giuseppe@southpole.se>
|
||||
|
||||
* log.c (logprintf): Exit immediately on a SIGPIPE error.
|
||||
|
@ -350,6 +350,13 @@ parse_set_cookie (const char *set_cookie, bool silent)
|
||||
goto error;
|
||||
if (!value.b)
|
||||
goto error;
|
||||
|
||||
/* If the value is quoted, do not modify it. */
|
||||
if (*(value.b - 1) == '"')
|
||||
value.b--;
|
||||
if (*value.e == '"')
|
||||
value.e++;
|
||||
|
||||
cookie->attr = strdupdelim (name.b, name.e);
|
||||
cookie->value = strdupdelim (value.b, value.e);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user