Skip to content

Conversation

@Kriechi
Copy link
Member

@Kriechi Kriechi commented Aug 9, 2020

Previously we printed a debug message with the headers to encode. This headers iterable could be a generator, which just debug-printed the type information, but not the expected header values within. See python-hyper/h2#1219.

As potential fix a previous commit simply converted it to a list - which then rendered the generator empty and unusable. The tests didn't cover this yet.

This commit removes the debug-print altogether, because each added header is already debug-printed in the add() function. We add some additional information to this existing debug print and remove the top-level debug-print in the encode() function.

This commit adds a simple test case for passing a generator as headers into encode().

see da26ef4#commitcomment-41234380
see python-hyper/h2#1219 (comment)

/cc @dimaqq

Previously we printed a debug message with the headers to encode. This headers iterable could be a generator, which just debug-printed the type information, but not the expected header values within. As potential fix a previous commit simply converted it to a list - which then rendered the generator empty and unusable. The tests didn't cover this yet. This commit removes the debug-print altogether, because each added header is already debug-printed in the add() function. We add some additional information to this existing debug print and remove the top-level debug-print in the encode() function. This commit adds a simple test case for passing a generator as headers into encode().
@Kriechi Kriechi force-pushed the fix-encoding-generator branch from 0b3cfac to 61f85bb Compare August 9, 2020 11:48
@Kriechi Kriechi merged commit 99e5658 into python-hyper:master Aug 9, 2020
@Kriechi Kriechi deleted the fix-encoding-generator branch August 9, 2020 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants