Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to tolerate multiple dynamic table size updates in one block. #95

Closed
Lukasa opened this issue Mar 27, 2017 · 1 comment
Closed

Comments

@Lukasa
Copy link
Member

Lukasa commented Mar 27, 2017

Spotted when running h2spec:

Generic tests for HTTP/2 server
  5. HPACK
         [send] SETTINGS Frame (length:6, flags:0x00, stream_id:0)
         [recv] SETTINGS Frame (length:36, flags:0x00, stream_id:0)
         [send] SETTINGS Frame (length:0, flags:0x01, stream_id:0)
         [recv] SETTINGS Frame (length:0, flags:0x01, stream_id:0)
         [send] HEADERS Frame (length:20, flags:0x05, stream_id:1)
Error decoding header block: Invalid table index 136381267
         [recv] GOAWAY Frame (length:8, flags:0x00, stream_id:0)
         [recv] Connection closed
    × 15: Sends multiple dynamic table size update
      -> The endpoint MUST accept multiple dynamic table size update
         Expected: HEADERS Frame (stream_id:1)
           Actual: Connection closed

Note the error after h2spec sends the HEADERS frame, leading to a GOAWAY.

The header block is the following Python byte string: b'?a?\xe1\x1f\x82\x87\x84A\x8a\x08\x9d\\\x0b\x81p\xdcy\xa6\x99'.

@Lukasa
Copy link
Member Author

Lukasa commented Mar 27, 2017

Ok, worked out the error. There was a subtle programming error in the code handling header compression context updates that meant that any update that was not literally first in a byte stream failed. This was mostly ok, as they should always be first, but it was possible to get more than one in a row and that would fail. Fix incoming.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant