Commit 99e5658
committed
fix encoding with generators
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().1 parent da26ef4 commit 99e5658
2 files changed
+16
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
232 | | - | |
233 | 232 | | |
234 | 233 | | |
235 | 234 | | |
| |||
265 | 264 | | |
266 | 265 | | |
267 | 266 | | |
268 | | - | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
269 | 273 | | |
270 | 274 | | |
271 | 275 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
338 | 338 | | |
339 | 339 | | |
340 | 340 | | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
341 | 351 | | |
342 | 352 | | |
343 | 353 | | |
| |||
0 commit comments