aneilbaboo / replayer

Replay HTTP requests for testing Node.js / Javascript code
Apache License 2.0
33 stars 7 forks source link

Issues saving & replaying binary assets (images, etc) #14

Closed cayleyh closed 6 years ago

cayleyh commented 7 years ago

We're seeing issues with saving and replaying binary requests for things like images & font files. They are being recorded with correct content size & headers, but the recorded data is not correct on replay.

I've taken a very brief look into the code and it looks like it might be an issue with not setting an encoding correctly on the buffer serialization, meaning it will default to 'utf-8'.

Anyone else seen this before I dig into it more..?

aneilbaboo commented 6 years ago

@cayleyh. Sorry I didn't see your comment earlier. I merged a PR that added support for gzip deflate issues. Could you recheck whether you're still having the problem?

If not, could you provide an example we could use in a test?

aneilbaboo commented 6 years ago

I added a test for this in the aneil/handleBinary branch.

There's no fix yet, so the test is failing.

cayleyh commented 6 years ago

Thanks @aneilbaboo. I haven't looped back around on this yet either. Let me check on if we're still working around this issue.