diff options
Diffstat (limited to 'netlib/http')
-rw-r--r-- | netlib/http/cookies.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/netlib/http/cookies.py b/netlib/http/cookies.py index a3ac4806..cb816ca0 100644 --- a/netlib/http/cookies.py +++ b/netlib/http/cookies.py @@ -241,21 +241,16 @@ def parse_set_cookie_header(line): """ Parse a Set-Cookie header value - Returns a list of (name, value, attrs) tuple for each cokie, or None. - Where attrs is a CookieAttrs dict of attributes. No attempt is made - to parse attribute values - they are treated purely as strings. + Returns a list of (name, value, attrs) tuples, where attrs is a + CookieAttrs dict of attributes. No attempt is made to parse attribute + values - they are treated purely as strings. """ cookie_pairs, off = _read_set_cookie_pairs(line) - cookies = [ (pairs[0][0], pairs[0][1], CookieAttrs(tuple(x) for x in pairs[1:])) for pairs in cookie_pairs if pairs ] - - if cookies: - return cookies - else: - return None + return cookies def parse_set_cookie_headers(headers): |