From eb343055185fabc892a590c6220b125283036b4e Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer Date: Thu, 20 Aug 2015 10:21:22 +0200 Subject: [PATCH] http2: fix frame length field --- netlib/http/http2/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netlib/http/http2/frame.py b/netlib/http/http2/frame.py index ad00a59af..24e6510af 100644 --- a/netlib/http/http2/frame.py +++ b/netlib/http/http2/frame.py @@ -98,7 +98,7 @@ class Frame(object): self._check_frame_size(self.length, self.state) - b = struct.pack('!HB', self.length & 0xFFFF00, self.length & 0x0000FF) + b = struct.pack('!HB', (self.length & 0xFFFF00) >> 8, self.length & 0x0000FF) b += struct.pack('!B', self.TYPE) b += struct.pack('!B', self.flags) b += struct.pack('!L', self.stream_id & 0x7FFFFFFF)