betamaxpy / betamax

A VCR imitation designed only for python-requests.
https://betamax.readthedocs.io/en/latest/
Other
566 stars 62 forks source link

Ignore chunked transport encoding header in recored responses #78

Closed roadsideseb closed 8 years ago

roadsideseb commented 8 years ago

A change in requests 2.8.0 forced the HTTPResponse used for recorded responses to be parsed as streamed data instead of an ordinary read. This breaks betamax when used with that version of requests.

This fix removes the chunked header from the recorded response (if it exists) to prevent requests from loading the response data as chunked stream data.

This might have some implications for use cases that rely on the chunked header to be set.

sigmavirus24 commented 8 years ago

Fixed by #79