aboutsummaryrefslogtreecommitdiffstats
path: root/netlib
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2016-07-16 13:54:17 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2016-07-16 18:31:37 +0200
commita32312cecc88662c13b724b9c6f2f641c1b72822 (patch)
tree83b9fa5aa94eb5e0f31718852b1537b739e912b9 /netlib
parentf0c15aa09c977ba89a2bd6b0b2371501f082828a (diff)
downloadmitmproxy-a32312cecc88662c13b724b9c6f2f641c1b72822.tar.gz
mitmproxy-a32312cecc88662c13b724b9c6f2f641c1b72822.tar.bz2
mitmproxy-a32312cecc88662c13b724b9c6f2f641c1b72822.zip
fix-1366
Diffstat (limited to 'netlib')
-rw-r--r--netlib/http/http1/read.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/netlib/http/http1/read.py b/netlib/http/http1/read.py
index a4c341fd..70fffbd4 100644
--- a/netlib/http/http1/read.py
+++ b/netlib/http/http1/read.py
@@ -244,7 +244,7 @@ def _read_request_line(rfile):
raise exceptions.HttpReadDisconnect("Client disconnected")
try:
- method, path, http_version = line.split(b" ")
+ method, path, http_version = line.split()
if path == b"*" or path.startswith(b"/"):
form = "relative"
@@ -291,8 +291,7 @@ def _read_response_line(rfile):
raise exceptions.HttpReadDisconnect("Server disconnected")
try:
-
- parts = line.split(b" ", 2)
+ parts = line.split(None, 2)
if len(parts) == 2: # handle missing message gracefully
parts.append(b"")