Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A test to demonstrate a misleading error for chunked response
If a chunked response is truncated exactly before sending a new chunk (that is, before the first byte of the chunk size), urllib3 throws `InvalidChunkLength(got length b'\\n', 0 bytes read)`. This is confusing as no chunk length was sent (a valid chunk length line would also be \r\n-terminated and we didn't see those either). In my opinion it would be better if urllib3 threw an IncompleteRead error instead. I've worked up a test that demonstrates the problem but I haven't figured out the right fix yet. I hope this is at least helpful.
- Loading branch information