without spewing an error.
Message-ID: <m365jucpci.fsf@xemacs.org>.
+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>
* url.c (append_uri_pathel): Use opt.restrict_file_names when
const char *name_b = NULL, *name_e = NULL;
const char *value_b = NULL, *value_e = NULL;
- FETCH (c, p);
-
while (state != S_DONE && state != S_ERROR)
{
switch (state)
{
case S_NAME_PRE:
- if (ISSPACE (c))
- FETCH (c, p);
+ /* Strip whitespace preceding the name. */
+ do
+ FETCH1 (c, p);
+ while (c && ISSPACE (c));
+ if (!c)
+ state = S_DONE;
else if (ATTR_NAME_CHAR (c))
{
name_b = p - 1;
state = S_ERROR;
break;
}
-
- if (c)
- FETCH1 (c, p);
- if (!c)
- state = S_DONE;
- else
- state = S_NAME_PRE;
+ state = S_NAME_PRE;
}
break;
case S_DONE: