Commit Graph

27 Commits

Author SHA1 Message Date
Aldo Cortesi
1ecb25cdc1 mitmproxy.types.[basethread,multidict,serializable] 2016-10-20 10:22:23 +13:00
Aldo Cortesi
070aa27cf5 parse_set_cookie header returns an empty list if no cookies are found
This matches parse_cookie, and is more idiomatic.
2016-09-28 15:10:31 +10:00
Shadab Zafar
fba7fe101e Clarify that 'expires' values MUST have a comma now 2016-09-27 21:28:54 +05:30
Shadab Zafar
6e6ed35e3e Modify format_set_cookie_header to take cookie list
and return a comma separated string of cookies
2016-09-27 21:28:51 +05:30
Shadab Zafar
a104d65851 Fixup an error with indices 2016-09-27 16:44:09 +05:30
Shadab Zafar
fd4f662871 Refactor functions 2016-09-27 16:44:09 +05:30
Shadab Zafar
06804e5448 Add a new pairs reader for SetCookie headers 2016-09-27 16:44:09 +05:30
Shadab Zafar
7802a0ba22 Rename _read_pairs to _read_cookie_pairs
We will have a separate _read_set_cookie_pairs
2016-09-27 16:44:09 +05:30
Shadab Zafar
90a48ccc06 Rename _read_token to _read_key
Since we also have a _read_value
2016-09-27 16:44:09 +05:30
Shadab Zafar
29046e6b48 Move CookieAttrs and SetCookie to top 2016-09-27 16:44:09 +05:30
Shadab Zafar
734a7d8a68 Minor refactor 2016-09-27 16:44:09 +05:30
Shadab Zafar
e80b2af4ae Add support for comma separated cookies 2016-09-27 16:44:08 +05:30
Shadab Zafar
3caebe7e73 Simplify cookies.is_expired 2016-08-15 12:00:23 +05:30
Shadab Zafar
03e6117042 Add a function to get cookie expiration time 2016-08-15 12:00:23 +05:30
Shadab Zafar
a479c51465 Add method to group pairs by cookies 2016-08-15 12:00:23 +05:30
Shadab Zafar
39f5108400 Test cookies.is_expired separately 2016-07-10 01:06:50 +05:30
Shadab Zafar
c92992f03b Move cookie expiry detection to separate function 2016-07-09 22:20:25 +05:30
Aldo Cortesi
44fdcb4b82 Reorganise netlib imports according to Google Style Guide 2016-06-01 11:12:10 +12:00
Thomas Kriechbaumer
e5038c9ab7 netlib: fix most flake8 offenses 2016-05-28 22:17:02 +02:00
Thomas Kriechbaumer
caee1adeb6 cleanup imports with flake8 2016-05-28 14:43:32 +02:00
Maximilian Hils
b538138ead tests++ 2016-05-20 11:04:27 -07:00
Maximilian Hils
6f8db2d7eb improve MultiDict, add ImmutableMultiDict, adjust response.cookies 2016-05-18 22:50:19 -07:00
Maximilian Hils
44ac64aa72 add MultiDict
This commit introduces MultiDict, a multi-dictionary similar to
ODict, but with improved semantics (as in the Headers class).
MultiDict fixes a few issues that were present in the Request/Response
API. In particular, `request.cookies["foo"] = "bar"` has previously been a
no-op, as the cookies property returned a mutable _copy_ of the cookies.
2016-05-18 18:46:42 -07:00
Thomas Kriechbaumer
e2ee48a0ee replace SimpleCookie with our own parser lib 2016-05-11 12:20:21 -05:00
Thomas Kriechbaumer
08002282e8 improve cookie parsing
allows '/' to be within a cookie name
removes deprecated cookie getter/setter
fixes #1118
2016-05-10 11:13:12 -05:00
Maximilian Hils
4e2acc4d9d move HTTPResponse.refresh into netlib 2016-04-02 22:49:05 +02:00
Maximilian Hils
d33d3663ec combine projects 2016-02-18 13:03:40 +01:00