Commit Graph

777 Commits

Author SHA1 Message Date
Aldo Cortesi
f29f6210bb Mandate that all handlers must be wrapped, make tests pass
mitmproxy, mitmdump and mitmweb masters still to be done
2016-05-28 11:00:00 +12:00
Aldo Cortesi
7c4843857b Sketch out a more solid core
- Decorator for handler methods
- Stricter checking for double-acks and non-acks
2016-05-28 11:00:00 +12:00
Shadab Zafar
bc6cd13356 Go Python 3 by default with the bytes conversion 2016-05-26 23:07:37 +05:30
Shadab Zafar
1bbb178b6a Remove inner_repr, fixup escape_unprintables 2016-05-26 23:07:37 +05:30
Shadab Zafar
22e4bc1938 Py3: Handle bytes case in inner_repr 2016-05-26 23:07:37 +05:30
Maximilian Hils
d3477e27fa bytes_to_escaped_str: always escape single quotes 2016-05-25 20:11:34 -07:00
Maximilian Hils
7a8da48a30 escaped_str_to_bytes: support unicode on python 2 2016-05-25 19:16:02 -07:00
Thomas Kriechbaumer
ebaad91484 Merge pull request #1127 from mitmproxy/tcp-flows
mitmdump: Add Basic Support for TCP Flows
2016-05-23 20:54:14 +02:00
Aldo Cortesi
97f3077082 Merge branch 'mhils-multidict' 2016-05-21 15:01:19 +12:00
Aldo Cortesi
43d7965532 Clean un-needed imports 2016-05-21 15:00:52 +12:00
Aldo Cortesi
123e3b130c We don't need 3 slightly different implementations of Data 2016-05-21 11:53:14 +12:00
Aldo Cortesi
a5c4cd0340 A clearer implementation of MultiDictView
This makes MultiDictView work with a simple getter/setter pair, rather than
using attributes with implicit leading underscores. Also move MultiDictView
into multidict.py and adds some simple unit tests.
2016-05-21 11:37:36 +12:00
Aldo Cortesi
96d8ec1ee3 Merge branch 'multidict' of https://github.com/mhils/mitmproxy into mhils-multidict 2016-05-21 10:15:37 +12:00
Maximilian Hils
84144ca0c6 tests: silence flaky pathod test 2016-05-20 14:05:04 -07:00
Maximilian Hils
a3946d2a2d tests++ 2016-05-20 13:27:26 -07:00
Maximilian Hils
b538138ead tests++ 2016-05-20 11:04:27 -07:00
Maximilian Hils
f96697646c add FlowMaster.active_flows 2016-05-19 22:09:00 -07:00
Maximilian Hils
d38989fe7e tests: finish connections properly 2016-05-19 22:07:56 -07:00
Maximilian Hils
d3c30d9005 fix tests, don't double-add error'd flows 2016-05-19 22:07:56 -07:00
Maximilian Hils
acd51befbb minor fixes, adjust tests 2016-05-19 22:07:56 -07:00
Thomas Kriechbaumer
79cb17ef03 Merge pull request #1152 from mhils/cleanup-odict
clean up odict
2016-05-19 16:47:51 +02:00
Maximilian Hils
a7b9e3033d tests: properly skip pathod tests 2016-05-18 22:51:27 -07:00
Maximilian Hils
6f8db2d7eb improve MultiDict, add ImmutableMultiDict, adjust response.cookies 2016-05-18 22:50:19 -07:00
Maximilian Hils
8e39b7bf38 test flow export with duplicate query string 2016-05-18 19:28:23 -07:00
Maximilian Hils
d1fc694952 clean up odict 2016-05-18 19:01:49 -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
4c3fb8f509 tests: xfail -> skip 2016-05-18 18:42:35 -07:00
Thomas Kriechbaumer
09b90fce9e remove debug print 2016-05-17 22:45:09 -07:00
Thomas Kriechbaumer
e61014d203 http2: add connection-lost test 2016-05-17 21:25:10 -07:00
Aldo Cortesi
d27fd55657 Fix broken test_flow_export tests
- Make the tests safe for concurrency
- Fix a test that only passed due to prior modification of global state

This also fixes the project generally for parallel test execution.
2016-05-18 12:34:45 +12:00
Aldo Cortesi
00cc836470 Clean up flow export tests
- Externalise test data
- Define a less finicky comparator for Python code
2016-05-18 12:16:50 +12:00
Thomas Kriechbaumer
2887480bcb fix naming which caused overwriting of functions 2016-05-15 10:39:39 -07:00
Thomas Kriechbaumer
f4a13d6f9f http2: improve header tests (#1143) (#1144) 2016-05-14 10:14:42 -07:00
Maximilian Hils
f1c922c652 Sanitize Print (#1135)
* sanitize strings with shell control characters

* netlib: add utilities to safe-print bytes

* escaped str: add TODO for multi-byte chars
2016-05-12 11:03:57 -06:00
Thomas Kriechbaumer
7a813936c6 disable http2 header encoding, use bytes everywhere 2016-05-11 16:47:58 -05:00
Thomas Kriechbaumer
bef72c1b02 Merge pull request #1121 from Kriechi/fix-cookies
improve cookie parsing
2016-05-11 12:30:44 -05:00
Thomas Kriechbaumer
e2ee48a0ee replace SimpleCookie with our own parser lib 2016-05-11 12:20:21 -05:00
Maximilian Hils
67a37e6d1f improve script loading 2016-05-11 11:15:36 -06:00
Maximilian Hils
4c8e334642 actually fix tests 2016-05-10 12:19:26 -06:00
Maximilian Hils
bb4f9611f5 Revert "fix tests"
This reverts commit f315dc1eb9.
2016-05-10 12:18:05 -06:00
Maximilian Hils
f315dc1eb9 fix tests 2016-05-10 12:17:25 -06: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
9d47d3b1ec fix #1120 2016-05-09 12:15:20 -06:00
Maximilian Hils
74cfd7a4e2 stateobject: support lists 2016-04-29 20:59:26 -07:00
Maximilian Hils
317b4becca mitmdump: don't fail for other flowtypes 2016-04-29 20:18:32 -07:00
Maximilian Hils
54c4859a95 remove netlib version check 2016-04-29 12:00:38 -07:00
Maximilian Hils
909d5ec87e FlowReadError -> FlowReadException 2016-04-29 11:17:49 -07:00
Steven Van Acker
66267ad276 support for setting/sending multiple cookies (#1091)
* support for setting/sending multiple cookies

* py.test for multiple cookie support
2016-04-22 11:16:05 -07:00
Maximilian Hils
5b12720962 silence flaky pathod test 2016-04-21 18:29:16 -07:00
Maximilian Hils
028f5c4929 downgrade pyparsing to fix #1087 and #1090 2016-04-21 17:11:28 -07:00