aboutsummaryrefslogtreecommitdiffstats
path: root/libpathod/language/http2.py
diff options
context:
space:
mode:
authorMaximilian Hils <git@maximilianhils.com>2015-09-17 15:25:28 +0200
committerMaximilian Hils <git@maximilianhils.com>2015-09-17 15:25:28 +0200
commit6661ad3143254f2d616e625e6a9092974cc60842 (patch)
tree6c4327f2bbbaf24e41202394f7d2c775e845d410 /libpathod/language/http2.py
parent8fa01f41a6c821d29e595f89613d3bb1b5aabb58 (diff)
downloadmitmproxy-6661ad3143254f2d616e625e6a9092974cc60842.tar.gz
mitmproxy-6661ad3143254f2d616e625e6a9092974cc60842.tar.bz2
mitmproxy-6661ad3143254f2d616e625e6a9092974cc60842.zip
code -> status_code, httpversion -> http_version
Diffstat (limited to 'libpathod/language/http2.py')
-rw-r--r--libpathod/language/http2.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/libpathod/language/http2.py b/libpathod/language/http2.py
index 829a05db..d5e3ca31 100644
--- a/libpathod/language/http2.py
+++ b/libpathod/language/http2.py
@@ -83,7 +83,7 @@ class _HTTP2Message(message.Message):
return self
-class Code(base.Integer):
+class StatusCode(base.Integer):
pass
@@ -159,8 +159,8 @@ class Response(_HTTP2Message):
self.stream_id = 2
@property
- def code(self):
- return self.tok(Code)
+ def status_code(self):
+ return self.tok(StatusCode)
@classmethod
def expr(cls):
@@ -168,7 +168,7 @@ class Response(_HTTP2Message):
atom = pp.MatchFirst(parts)
resp = pp.And(
[
- Code.expr(),
+ StatusCode.expr(),
pp.ZeroOrMore(base.Sep + atom)
]
)
@@ -187,7 +187,7 @@ class Response(_HTTP2Message):
resp = http.Response(
(2, 0),
- self.code.string(),
+ self.status_code.string(),
'',
headers,
body,
@@ -289,7 +289,7 @@ class Request(_HTTP2Message):
def make_error_response(reason, body=None):
tokens = [
- Code("800"),
+ StatusCode("800"),
Body(base.TokValueLiteral("pathod error: " + (body or reason))),
]
return Response(tokens)