`delete` with content will fail
JohnVillalovos opened this issue · comments
John Villalovos commented
Describe the bug
Reproducer in #655
def generate():
# Special case for urllib3.
if hasattr(self.raw, "stream"):
try:
yield from self.raw.stream(chunk_size, decode_content=True)
except ProtocolError as e:
> raise ChunkedEncodingError(e)
E requests.exceptions.ChunkedEncodingError: ('Connection broken: IncompleteRead(29 bytes read, -29 more expected)', IncompleteRead(29 bytes read, -29 more expected))
Additional context
No response
Version of responses
0.23.2
Steps to Reproduce
Use #655 and run tox
Expected Result
No error
Actual Result
Error
John Villalovos commented
So after further investigation this seems a requests
issue where if it is a 204 (No Content) then it sets the expected length to 0.