aboutsummaryrefslogtreecommitdiffstats
path: root/netlib/http2/frame.py
diff options
context:
space:
mode:
authorThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-15 13:15:06 +0200
committerThomas Kriechbaumer <thomas@kriechbaumer.name>2015-06-16 14:55:08 +0200
commit12702b9a01fb6baf4d675d6f974c140581982843 (patch)
tree703bde35042c67341bdb5fd822a41bc7132eca39 /netlib/http2/frame.py
parent1f0c55a942ef1e36d21e2d8006a1585ad4cf2700 (diff)
downloadmitmproxy-12702b9a01fb6baf4d675d6f974c140581982843.tar.gz
mitmproxy-12702b9a01fb6baf4d675d6f974c140581982843.tar.bz2
mitmproxy-12702b9a01fb6baf4d675d6f974c140581982843.zip
http2: improve frame output
Diffstat (limited to 'netlib/http2/frame.py')
-rw-r--r--netlib/http2/frame.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/netlib/http2/frame.py b/netlib/http2/frame.py
index 4a305d82..3e285cba 100644
--- a/netlib/http2/frame.py
+++ b/netlib/http2/frame.py
@@ -113,16 +113,11 @@ class Frame(object):
def payload_human_readable(self): # pragma: no cover
raise NotImplementedError()
- def human_readable(self):
+ def human_readable(self, direction="-"):
return "\n".join([
- "============================================================",
- "length: %d bytes" % self.length,
- "type: %s (%#x)" % (self.__class__.__name__, self.TYPE),
- "flags: %#x" % self.flags,
- "stream_id: %#x" % self.stream_id,
- "------------------------------------------------------------",
+ "%s: %s | length: %d | flags: %#x | stream_id: %d" % (direction, self.__class__.__name__, self.length, self.flags, self.stream_id),
self.payload_human_readable(),
- "============================================================",
+ "===============================================================",
])
def __eq__(self, other):