tornado_http2 icon indicating copy to clipboard operation
tornado_http2 copied to clipboard

set defaults for settings, and respect max_frame_size in sending

Open kahuang opened this issue 6 years ago • 2 comments

responses to clients

kahuang avatar Feb 21 '19 23:02 kahuang

I'm using this http2 server as a same-process testing server for a tornado based http2 client. For large body values, the server wasn't respecting the max frame size, causing errors on the client side:

File "build/bdist.linux-x86_64/egg/h2/frame_buffer.py", line 150, in next self._validate_frame_length(length) File "build/bdist.linux-x86_64/egg/h2/frame_buffer.py", line 81, in _validate_frame_length (length, self.max_frame_size) FrameTooLargeError: Received overlong frame: length 65535, max 16384

This PR solves that issue by ensuring that 1. We have our settings initialized as the defaults and 2. We respect the MAX_FRAME_SIZE setting

kahuang avatar Feb 21 '19 23:02 kahuang

I've added a test that writes the payload all at once, instead of in chunks.

kahuang avatar Feb 25 '19 17:02 kahuang