liyishuai / coq-http2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Testing HPACK

olekgierczak opened this issue · comments

Does anybody have any suggestions for testing HPACK beyond comparing to the spec by eye? The spec provides some examples that I had hoped to use but I found that the way they represent strings is strange.

Specifically, in this example, 0a corresponds to ".", while in ascii, it corresponds to a newline "\n". All of the examples (besides encoding integers) have cases like this, which means I can't simply copy and paste and then compare the output to the value.

They also provide the hex value, so I was thinking of instead copy and pasting and comparing the output value converted to a hex dump either in or outside coq, but I'm not sure that's worth the effort.

I was also thinking about testing (or better yet proving) some proposition relating the encoding and decoding (like that decoding an encoded header field representation is the identity) but I'm not sure what kind of real guarantees this gives.