diff options
author | Maximilian Hils <git@maximilianhils.com> | 2015-08-29 20:56:19 +0200 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2015-08-29 20:56:19 +0200 |
commit | 2d0d240abc5b864193ce3d4a3cffbea002b9928c (patch) | |
tree | 9e437586545a3f2b27d937aad9f5cc9954e5476b | |
parent | 4a8fd79e334661c1a11cd1cd28d62e6999b384d9 (diff) | |
parent | daf512ce936268b7b1095ca2991b69157f79c122 (diff) | |
download | mitmproxy-2d0d240abc5b864193ce3d4a3cffbea002b9928c.tar.gz mitmproxy-2d0d240abc5b864193ce3d4a3cffbea002b9928c.tar.bz2 mitmproxy-2d0d240abc5b864193ce3d4a3cffbea002b9928c.zip |
Merge branch 'master' of https://github.com/mitmproxy/netlib
-rw-r--r-- | netlib/http/http2/frame.py | 3 | ||||
-rw-r--r-- | test/http/http2/test_frames.py | 11 |
2 files changed, 2 insertions, 12 deletions
diff --git a/netlib/http/http2/frame.py b/netlib/http/http2/frame.py index 24e6510a..b36b3adf 100644 --- a/netlib/http/http2/frame.py +++ b/netlib/http/http2/frame.py @@ -290,9 +290,6 @@ class PriorityFrame(Frame): raise ValueError( 'PRIORITY frames MUST be associated with a stream.') - if self.stream_dependency == 0x0: - raise ValueError('stream dependency is invalid.') - return struct.pack( '!LB', (int( diff --git a/test/http/http2/test_frames.py b/test/http/http2/test_frames.py index 077f5bc2..5d5cb0ba 100644 --- a/test/http/http2/test_frames.py +++ b/test/http/http2/test_frames.py @@ -246,9 +246,9 @@ def test_priority_frame_to_bytes(): flags=(Frame.FLAG_NO_FLAGS), stream_id=0x1234567, exclusive=True, - stream_dependency=0x7654321, + stream_dependency=0x0, weight=42) - assert_equal(f.to_bytes().encode('hex'), '000005020001234567876543212a') + assert_equal(f.to_bytes().encode('hex'), '000005020001234567800000002a') f = PriorityFrame( length=5, @@ -266,13 +266,6 @@ def test_priority_frame_to_bytes(): stream_dependency=0x1234567) tutils.raises(ValueError, f.to_bytes) - f = PriorityFrame( - length=5, - flags=Frame.FLAG_NO_FLAGS, - stream_id=0x1234567, - stream_dependency=0x0) - tutils.raises(ValueError, f.to_bytes) - def test_priority_frame_from_bytes(): f = Frame.from_file(hex_to_file('000005020001234567876543212a')) |