aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/har_extractor.py2
-rw-r--r--mitmproxy/models/flow.py1
-rw-r--r--netlib/http/response.py10
-rw-r--r--pathod/pathoc.py2
-rw-r--r--test/netlib/http/http2/test_connections.py4
5 files changed, 4 insertions, 15 deletions
diff --git a/examples/har_extractor.py b/examples/har_extractor.py
index 15e1ef30..371e2282 100644
--- a/examples/har_extractor.py
+++ b/examples/har_extractor.py
@@ -143,7 +143,7 @@ def response(context, flow):
},
"response": {
"status": flow.response.status_code,
- "statusText": flow.response.msg,
+ "statusText": flow.response.reason,
"httpVersion": flow.response.http_version,
"cookies": format_cookies(flow.response.cookies),
"headers": format_headers(flow.response.headers),
diff --git a/mitmproxy/models/flow.py b/mitmproxy/models/flow.py
index 95fb2b69..45b3b5e0 100644
--- a/mitmproxy/models/flow.py
+++ b/mitmproxy/models/flow.py
@@ -28,7 +28,6 @@ class Error(stateobject.StateObject):
@type msg: str
@type timestamp: float
"""
- self.flow = None # will usually be set by the flow backref mixin
self.msg = msg
self.timestamp = timestamp or utils.timestamp()
diff --git a/netlib/http/response.py b/netlib/http/response.py
index 8af3c041..5fce4d79 100644
--- a/netlib/http/response.py
+++ b/netlib/http/response.py
@@ -103,13 +103,3 @@ class Response(Message):
def set_cookies(self, odict): # pragma: no cover
warnings.warn(".set_cookies is deprecated, use .cookies instead.", DeprecationWarning)
self.cookies = odict
-
- @property
- def msg(self): # pragma: no cover
- warnings.warn(".msg is deprecated, use .reason instead.", DeprecationWarning)
- return self.reason
-
- @msg.setter
- def msg(self, reason): # pragma: no cover
- warnings.warn(".msg is deprecated, use .reason instead.", DeprecationWarning)
- self.reason = reason
diff --git a/pathod/pathoc.py b/pathod/pathoc.py
index 0e6d3ca7..f55a2eda 100644
--- a/pathod/pathoc.py
+++ b/pathod/pathoc.py
@@ -425,7 +425,7 @@ class Pathoc(tcp.TCPClient):
finally:
if resp:
lg("<< %s %s: %s bytes" % (
- resp.status_code, utils.xrepr(resp.msg), len(resp.content)
+ resp.status_code, utils.xrepr(resp.reason), len(resp.content)
))
if resp.status_code in self.ignorecodes:
lg.suppress()
diff --git a/test/netlib/http/http2/test_connections.py b/test/netlib/http/http2/test_connections.py
index c067d487..0a142afa 100644
--- a/test/netlib/http/http2/test_connections.py
+++ b/test/netlib/http/http2/test_connections.py
@@ -417,7 +417,7 @@ class TestReadResponse(tservers.ServerTestBase):
assert resp.http_version == "HTTP/2.0"
assert resp.status_code == 200
- assert resp.msg == ''
+ assert resp.reason == ''
assert resp.headers.fields == [[b':status', b'200'], [b'etag', b'foobar']]
assert resp.content == b'foobar'
assert resp.timestamp_end
@@ -444,7 +444,7 @@ class TestReadEmptyResponse(tservers.ServerTestBase):
assert resp.stream_id == 42
assert resp.http_version == "HTTP/2.0"
assert resp.status_code == 200
- assert resp.msg == ''
+ assert resp.reason == ''
assert resp.headers.fields == [[b':status', b'200'], [b'etag', b'foobar']]
assert resp.content == b''