diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2011-02-19 17:00:24 +1300 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2011-02-19 17:00:24 +1300 |
commit | 5da27a9905302a5e43fdf4db8a7b7b784544bed2 (patch) | |
tree | 83b5890142d37b65b655a8d60a3082313fa0cdd3 /test/utils.py | |
parent | cd4eea39348fc9d59d4f0cc3f71384f7c1c2b2e2 (diff) | |
download | mitmproxy-5da27a9905302a5e43fdf4db8a7b7b784544bed2.tar.gz mitmproxy-5da27a9905302a5e43fdf4db8a7b7b784544bed2.tar.bz2 mitmproxy-5da27a9905302a5e43fdf4db8a7b7b784544bed2.zip |
Refactor Flow primitives to remove HTTP1.0 assumption.
This is a big patch removing the assumption that there's one connection per
Request/Response pair. It touches pretty much every part of mitmproxy, so
expect glitches until everything is ironed out.
Diffstat (limited to 'test/utils.py')
-rw-r--r-- | test/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/utils.py b/test/utils.py index b63c48dc..b1dc46d4 100644 --- a/test/utils.py +++ b/test/utils.py @@ -2,7 +2,7 @@ from libmproxy import proxy, utils, filt, flow def treq(conn=None): if not conn: - conn = proxy.ClientConnection(("address", 22)) + conn = proxy.ClientConnect(("address", 22)) headers = utils.Headers() headers["header"] = ["qvalue"] return proxy.Request(conn, "host", 80, "http", "GET", "/path", headers, "content") @@ -17,6 +17,6 @@ def tresp(req=None): def tflow(): - bc = proxy.ClientConnection(("address", 22)) - return flow.Flow(bc) + r = treq() + return flow.Flow(r) |