Open kahuang opened 5 years ago
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
I've added a test that writes the payload all at once, instead of in chunks.
responses to clients