aboutsummaryrefslogtreecommitdiffstats
path: root/netlib
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@corte.si>2016-07-17 15:06:58 +1200
committerGitHub <noreply@github.com>2016-07-17 15:06:58 +1200
commitfb45d59c0257cdec38b14e8839fb2dbca079fb97 (patch)
tree116b1cd6a4ed083d22c9f8f77fa00bf49f51a6e9 /netlib
parent15c7528faf3374e246eb7de02c194edcf0d913b2 (diff)
parenta32312cecc88662c13b724b9c6f2f641c1b72822 (diff)
downloadmitmproxy-fb45d59c0257cdec38b14e8839fb2dbca079fb97.tar.gz
mitmproxy-fb45d59c0257cdec38b14e8839fb2dbca079fb97.tar.bz2
mitmproxy-fb45d59c0257cdec38b14e8839fb2dbca079fb97.zip
Merge pull request #1367 from Kriechi/fix-1366
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"")