aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_protocol_http.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2016-01-02 15:12:36 +0100
committerMaximilian Hils <git@maximilianhils.com>2016-01-02 15:12:36 +0100
commit11215e46ecc5c3a4272893d4b06f71920ff126f5 (patch)
treea021718838659b7cead7b3db81bb9756f7b766b9 /test/test_protocol_http.py
parentf8d8a80bd07fe1e40577a2090ba47e3cc5abd3d3 (diff)
downloadmitmproxy-11215e46ecc5c3a4272893d4b06f71920ff126f5.tar.gz
mitmproxy-11215e46ecc5c3a4272893d4b06f71920ff126f5.tar.bz2
mitmproxy-11215e46ecc5c3a4272893d4b06f71920ff126f5.zip
fix #659
Diffstat (limited to 'test/test_protocol_http.py')
-rw-r--r--test/test_protocol_http.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/test_protocol_http.py b/test/test_protocol_http.py
index 8c843d73..1f0386b4 100644
--- a/test/test_protocol_http.py
+++ b/test/test_protocol_http.py
@@ -1,7 +1,6 @@
import socket
from io import BytesIO
from netlib.exceptions import HttpSyntaxException
-
from netlib.http import http1
from netlib.tcp import TCPClient
from netlib.tutils import treq, raises
@@ -82,3 +81,10 @@ class TestExpectHeader(tservers.HTTPProxTest):
assert resp.status_code == 200
client.finish()
+
+
+class TestHeadContentLength(tservers.HTTPProxTest):
+ def test_head_content_length(self):
+ p = self.pathoc()
+ resp = p.request("""head:'%s/p/200:h"Content-Length"="42"'""" % self.server.urlbase)
+ assert resp.headers["Content-Length"] == "42" \ No newline at end of file