Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

Handle compression #171

Open
maxlinc opened this issue Feb 12, 2015 · 0 comments
Open

Handle compression #171

maxlinc opened this issue Feb 12, 2015 · 0 comments

Comments

@maxlinc
Copy link
Collaborator

maxlinc commented Feb 12, 2015

Most of the time Pacto seems to be handling compression okay, but I just ran across a test where pacto was proxying a compressed response and responded with a compressed body but without the proper headers. I'm not sure if this was a pacto issue or if the server itself wasn't sending the proper headers.

The workaround was to not forward accept-encoding, but a more proper fix is to make sure the body is decoded as necessary.

Note: This worked, at least for a Gzip stream: Zlib::GzipReader.new(StringIO.new(pacto_response.body))

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant