From fba7fe101e0bec7bb6b10362477274caa523d54e Mon Sep 17 00:00:00 2001 From: Shadab Zafar Date: Tue, 27 Sep 2016 21:06:26 +0530 Subject: Clarify that 'expires' values MUST have a comma now --- netlib/http/cookies.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'netlib') diff --git a/netlib/http/cookies.py b/netlib/http/cookies.py index 2c0fcafd..a3ac4806 100644 --- a/netlib/http/cookies.py +++ b/netlib/http/cookies.py @@ -154,8 +154,11 @@ def _read_set_cookie_pairs(s, off=0): # 'expires' values can contain commas in them so they need to # be handled separately. + # We actually bank on the fact that the expires value WILL + # contain a comma. Things will fail, if they don't. + # '3' is just a heuristic we use to determine whether we've - # only read a part of the datetime and should read more. + # only read a part of the expires value and we should read more. if len(rhs) <= 3: trail, off = _read_value(s, off + 1, ";,") rhs = rhs + "," + trail -- cgit v1.2.3