diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-07-01 17:17:16 -0700 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-07-01 17:17:16 -0700 |
commit | fa7246279817b7c01448fd4059c8d2be34e84f8b (patch) | |
tree | c223573d8b3fd24c2e5dbe037df3f0bf35265884 /netlib/http | |
parent | 536c7acd13426d42dc863ae8b50e6c3a4cb2e858 (diff) | |
download | mitmproxy-fa7246279817b7c01448fd4059c8d2be34e84f8b.tar.gz mitmproxy-fa7246279817b7c01448fd4059c8d2be34e84f8b.tar.bz2 mitmproxy-fa7246279817b7c01448fd4059c8d2be34e84f8b.zip |
fix tcp message handling
Diffstat (limited to 'netlib/http')
-rw-r--r-- | netlib/http/request.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/netlib/http/request.py b/netlib/http/request.py index ff057b79..d9f4ed00 100644 --- a/netlib/http/request.py +++ b/netlib/http/request.py @@ -28,7 +28,7 @@ class RequestData(message.MessageData): self.first_line_format = first_line_format self.method = method - self.scheme = scheme or b'' + self.scheme = scheme self.host = host self.port = port self.path = path @@ -106,6 +106,8 @@ class Request(message.Message): """ HTTP request scheme, which should be "http" or "https". """ + if not self.data.scheme: + return self.data.scheme return message._native(self.data.scheme) @scheme.setter |