python-hyper / hpack

Pure-Python HTTP/2 header encoding
https://python-hyper.org/
MIT License
73 stars 31 forks source link

Decoding Error Exceptions #7

Open jimcarreer opened 9 years ago

jimcarreer commented 9 years ago

We would like to throw exceptions in the event of a decoding error (Huffman or HPACK). This work some-what blocks Issue #2 since proper fuzz testing would only really be nice with some kind of error handling framework. I would like to include the byte position decoding began at as well as how far we read from the byte string before the error was encountered if possible. I think it might also be nice (but not necessary) to include the headers that were successfully decoded up to that point.

MC874 commented 2 years ago

Yep, It still produce HPackDecodingError:

hpack.exceptions.HPACKDecodingError: Unable to decode HPACK integer representation from <memory at 0x7f8b75ee9d80>