Aldo Cortesi
1ecb25cdc1
mitmproxy.types.[basethread,multidict,serializable]
2016-10-20 10:22:23 +13:00
Aldo Cortesi
f45f4e677e
netlib.strutils -> mitmproxy.utils.strutils
2016-10-20 10:11:58 +13:00
Thomas Kriechbaumer
94c9dd66e6
remove empty lines at beginning of file
2016-10-17 10:32:12 +02:00
Aldo Cortesi
c774a9fec9
python3: clean up super and __future__
2016-10-17 18:03:07 +13:00
Aldo Cortesi
8360f70024
First-order conversion to Python3-only
...
- Zap various occurrences of Python2 in docs and scripts
- Remove six from netlib, and some other places where obvious project-wide
search and replace works.
2016-10-17 15:18:47 +13:00
Maximilian Hils
770936f1f9
raise TypeError on invalid header assignment, fix #1562
2016-09-21 19:21:32 -07:00
arjun23496
a8deed1f4e
Lint fix - minor
2016-08-31 16:39:04 +05:30
arjun23496
e5766550f1
Lint fix - netlib headers
2016-08-31 16:22:20 +05:30
arjun23496
dd2e0d1df3
minor bug fix header replace
2016-08-31 16:11:59 +05:30
arjun23496
d2cfa5ca41
Added tests for replace in request,message,header
2016-08-31 10:23:33 +05:30
arjun23496
99744cc780
Added replace for request and headers - Fixed missing replace option
2016-08-29 16:50:14 +05:30
Maximilian Hils
b27d59095d
Merge pull request #1306 from mitmproxy/message-body-encoding
...
Improve Message Body Encoding
2016-07-16 00:13:58 -07:00
Maximilian Hils
e6e39ce80f
preserve content-type parameter order
2016-07-15 23:46:12 -07:00
Aldo Cortesi
1a1f7e6fd9
replacehooks -> addon
...
Also fixes a bug in header replacements in netlib that resulted in a mutable
multidict.
2016-07-16 18:37:30 +12:00
Maximilian Hils
3602fd7a36
Merge remote-tracking branch 'origin/master' into message-body-encoding
2016-07-15 23:17:57 -07:00
Maximilian Hils
a3c7c84d49
improve message content semantics
2016-07-15 22:50:33 -07:00
Maximilian Hils
9c873d63f4
py3++, multidict fixes
...
This commit improves Python 3 compatibility and fixes two multidict
issues:
1. Headers.items(multi=True) now decodes fields
2. MultiDict.clear(item) has been removed, as Python's
MutableMapping already defines .clear() with different
semantics. This is confusing for everyone who expects a
dict-like object. `.pop("attr", None)` is not fantastic,
but it's the Python way to do it.
2016-07-06 19:53:29 -07:00
Maximilian Hils
536c7acd13
py3++
2016-07-01 14:10:48 -07:00
Aldo Cortesi
cccdc98426
Utils reorganisation: add netlib.strutils
...
Extract a number of string and format-related functions to netlib.strutils.
2016-06-02 12:31:41 +12:00
Aldo Cortesi
44fdcb4b82
Reorganise netlib imports according to Google Style Guide
2016-06-01 11:12:10 +12:00
Aldo Cortesi
40a030f215
Satisfy flake8
2016-05-31 19:58:28 +12:00
Aldo Cortesi
ec34cae618
utils.multipartdecode -> http.multipart.decode
...
also
utils.parse_content_type -> http.headers.parse_content_type
2016-05-31 19:07:55 +12:00
Aldo Cortesi
e8290a0eb4
Satisfy flake8
2016-05-30 12:41:44 +12:00
Thomas Kriechbaumer
e2447406cc
more style cleanup
2016-05-29 13:43:20 +02:00
Maximilian Hils
85aa5da6e3
fix tests
2016-05-28 19:31:43 -07:00
Thomas Kriechbaumer
e5038c9ab7
netlib: fix most flake8 offenses
2016-05-28 22:17:02 +02:00
Maximilian Hils
560fc756aa
fix Header docs
2016-05-20 09:37:13 -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
Maximilian Hils
806aa0f41c
improve .replace() and move it into netlib
2016-04-02 14:38:33 +02:00
Maximilian Hils
4ee8808b44
add Serializeable.copy
2016-04-02 13:50:53 +02:00
Thomas Kriechbaumer
ec68d8b8e4
s/nocover/no cover/g
...
according to coveralls docs
2016-03-27 12:02:41 +02:00
Maximilian Hils
d33d3663ec
combine projects
2016-02-18 13:03:40 +01:00