X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Fcookies.c;h=a10971ca86e35fc09ccfc2436e6227224610c64c;hp=7c3fb1cbab9708b7a20e45b449edf7528fc28983;hb=0aa3c5d33c5faa8902fa638c36314deae45460f3;hpb=378c2030799bdc51d7240321ad06607c5b2d1a31 diff --git a/src/cookies.c b/src/cookies.c index 7c3fb1cb..a10971ca 100644 --- a/src/cookies.c +++ b/src/cookies.c @@ -391,6 +391,9 @@ parse_set_cookie (const char *set_cookie, bool silent) goto error; BOUNDED_TO_ALLOCA (value.b, value.e, value_copy); + /* Check if expiration spec is valid. + If not, assume default (cookie doesn't expire, but valid only for + this session.) */ expires = http_atotm (value_copy); if (expires != (time_t) -1) { @@ -402,10 +405,6 @@ parse_set_cookie (const char *set_cookie, bool silent) if (cookie->expiry_time < cookies_now) cookie->discard_requested = 1; } - else - /* Error in expiration spec. Assume default (cookie doesn't - expire, but valid only for this session.) */ - ; } else if (TOKEN_IS (name, "max-age")) { @@ -433,9 +432,7 @@ parse_set_cookie (const char *set_cookie, bool silent) /* ignore value completely */ cookie->secure = 1; } - else - /* Ignore unrecognized attribute. */ - ; + /* else: Ignore unrecognized attribute. */ } if (*ptr) /* extract_param has encountered a syntax error */