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

Failure to decode header block results in error #16

Open
CrowdHailer opened this issue Jul 26, 2017 · 0 comments
Open

Failure to decode header block results in error #16

CrowdHailer opened this issue Jul 26, 2017 · 0 comments

Comments

@CrowdHailer
Copy link
Contributor

Hi,
I'm running h2spec against a server implementation I have that is using this library. One of the tests in there (HPACK/5.2 - 3: Sends a Huffman-encoded string literal representation containing the EOS symbol) sends a header_block that causes an error to be raised rather than the library returning an :error tuple.

The following code execution will reproduce it

# iex(2)> header_block = <<130, 135, 132, 65, 138, 8, 157, 92, 11, 129, 112, 220, 121, 166, 153, 0, 133,
  242, 178, 74, 135, 255, 255, 255, 253, 37, 66, 127>>
<<130, 135, 132, 65, 138, 8, 157, 92, 11, 129, 112, 220, 121, 166, 153, 0, 133,
  242, 178, 74, 135, 255, 255, 255, 253, 37, 66, 127>>
# iex(3)> decode_context = :hpack.new_context(1_000) 
{:hpack_context, {:dynamic_table, [], 4096, 0}, 1000}
# iex(4)> :hpack.decode(header_block, decode_context)
** (MatchError) no match of right hand side value: "B\d"
    (hpack) /vagrant/Ace/examples/hello_http2/deps/hpack/src/hpack_string.erl:14: :hpack_string.decode/1
    (hpack) /vagrant/Ace/examples/hello_http2/deps/hpack/src/hpack.erl:188: :hpack.decode_literal_header_without_indexing/3

above is Elixir syntax. I can translate it to erlang if need be but I though would start copying verbatim so no mistakes.

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