assaf / node-replay

When API testing slows you down: record and replay HTTP responses like a boss
http://documentup.com/assaf/node-replay
MIT License
522 stars 107 forks source link

Unzipped responses should have Content-Length removed #142

Closed s25g5d4 closed 6 years ago

s25g5d4 commented 6 years ago

Some server do add Content-Length in response header. For zipped responses, the content-length is the compressed, compact size of data of course. But because in PR #72 zipped responses will get decompressed, if content-length is presented in original response header, it should be updated, or, removed. I'm willing to send a PR to fix it. It is just an one-line fix, I would really appreciate it if you could take a look.

s25g5d4 commented 6 years ago

Forgot to say that why I made this ticket is because, I have some SVGs that will be sent gzipped by server. But because the content-length recorded in fixtures are smaller than the actual data size, browser will truncate responses and fail to parse those SVGs.

marcusschiesser commented 6 years ago

@assaf - any plans to release this commit soon?