aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_http.py
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2013-12-08 10:15:43 +1300
committerAldo Cortesi <aldo@nullcube.com>2013-12-08 10:15:43 +1300
commited74b628569348d3d71cfe6e6a5f29b5289ee82c (patch)
tree0d23809113380fbcf78531a41fb913af134e6c12 /test/test_http.py
parentbed2aed9db346f37b858c8f7f069f65e9f59d0e9 (diff)
parent5aad09ab816b2343ca686d45e6c5d2b8ba07b10b (diff)
downloadmitmproxy-ed74b628569348d3d71cfe6e6a5f29b5289ee82c.tar.gz
mitmproxy-ed74b628569348d3d71cfe6e6a5f29b5289ee82c.tar.bz2
mitmproxy-ed74b628569348d3d71cfe6e6a5f29b5289ee82c.zip
Merge branch 'fix_invalid_tcp_close'
Diffstat (limited to 'test/test_http.py')
-rw-r--r--test/test_http.py22
1 files changed, 5 insertions, 17 deletions
diff --git a/test/test_http.py b/test/test_http.py
index 62d0c3dc..4d89bf24 100644
--- a/test/test_http.py
+++ b/test/test_http.py
@@ -38,28 +38,16 @@ def test_read_chunked():
tutils.raises("too large", http.read_chunked, 500, s, 2)
-def test_request_connection_close():
+def test_connection_close():
h = odict.ODictCaseless()
- assert http.request_connection_close((1, 0), h)
- assert not http.request_connection_close((1, 1), h)
+ assert http.connection_close((1, 0), h)
+ assert not http.connection_close((1, 1), h)
h["connection"] = ["keep-alive"]
- assert not http.request_connection_close((1, 1), h)
+ assert not http.connection_close((1, 1), h)
h["connection"] = ["close"]
- assert http.request_connection_close((1, 1), h)
-
-
-def test_response_connection_close():
- h = odict.ODictCaseless()
- assert http.response_connection_close((1, 1), h)
-
- h["content-length"] = [10]
- assert not http.response_connection_close((1, 1), h)
-
- h["connection"] = ["close"]
- assert http.response_connection_close((1, 1), h)
-
+ assert http.connection_close((1, 1), h)
def test_read_http_body_response():
h = odict.ODictCaseless()