Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit c94507b

Browse files
committed
Confirm we propagate window sizes correctly.
1 parent cee3a71 commit c94507b

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/test_hyper.py

+16
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,22 @@ def test_connections_handle_resizing_max_frame_size_properly(self):
335335
assert f2.stream_id == 0
336336
assert f2.flags == set(['ACK'])
337337

338+
def test_connections_handle_resizing_initial_window_size(self):
339+
sock = DummySocket()
340+
f = SettingsFrame(0)
341+
f.settings[SettingsFrame.INITIAL_WINDOW_SIZE] = 256
342+
c = HTTP20Connection('www.google.com')
343+
c._sock = sock
344+
345+
# 'Receive' the SETTINGS frame.
346+
c.receive_frame(f)
347+
348+
# Open a new stream.
349+
c.request('GET', '/')
350+
351+
# Confirm that the stream has the correct window size.
352+
assert c.streams[1]._out_flow_control_window == 256
353+
338354
def test_connections_handle_too_small_max_frame_size_properly(self):
339355
sock = DummySocket()
340356
f = SettingsFrame(0)

0 commit comments

Comments
 (0)