aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http/cookies.py
diff options
context:
space:
mode:
authorShadab Zafar <dufferzafar0@gmail.com>2016-09-27 21:06:26 +0530
committerShadab Zafar <dufferzafar0@gmail.com>2016-09-27 21:28:54 +0530
commitfba7fe101e0bec7bb6b10362477274caa523d54e (patch)
tree2836656a3f33364091f6bb877f7248f3dc0f313b /netlib/http/cookies.py
parent5383c15ff2db01fd8aad9d3ef1a9b5f1b0a361cf (diff)
downloadmitmproxy-fba7fe101e0bec7bb6b10362477274caa523d54e.tar.gz
mitmproxy-fba7fe101e0bec7bb6b10362477274caa523d54e.tar.bz2
mitmproxy-fba7fe101e0bec7bb6b10362477274caa523d54e.zip
Clarify that 'expires' values MUST have a comma now
Diffstat (limited to 'netlib/http/cookies.py')
-rw-r--r--netlib/http/cookies.py5
1 files changed, 4 insertions, 1 deletions
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