Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Server proxy corrupts JSON #92

Open
mgmorcos opened this issue Sep 30, 2023 · 2 comments
Open

Bug: Server proxy corrupts JSON #92

mgmorcos opened this issue Sep 30, 2023 · 2 comments

Comments

@mgmorcos
Copy link

mgmorcos commented Sep 30, 2023

Server proxy seems to strip escape characters from JSON request bodies, making them invalid.

Observed in diff between identical requests sent from (a) Axios and (b) Yaade configured to use server proxy. In the screenshot below, slash has been removed by Yaade, so the double quotation mark is no longer escaped, and the JSON becomes invalid.

Screenshot 2023-09-30 at 11 40 09 AM

Web inspector shows the slash is present when the request leaves the browser, so the corruption may be happening in the server proxy.

Running Yaade in Docker Compose on Debian Buster (amd64).

@jonrosner
Copy link
Contributor

Interesting find. We don't do anything with the response. If this is true then the web client we are using might do some formatting. I will test it on my side and report back.

@mgmorcos
Copy link
Author

mgmorcos commented Oct 3, 2023

Thank you @jonrosner!

Not the response, but the request body that's corrupted. Here is the original issue that I misfiled with Hapi.js, in case it can be of use:

hapijs/hapi#4461 (comment)

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

No branches or pull requests

2 participants