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

Fix response header escaping #1050

Merged
merged 4 commits into from
Feb 23, 2024
Merged

Fix response header escaping #1050

merged 4 commits into from
Feb 23, 2024

Conversation

bgrgicak
Copy link
Collaborator

Fixes #1046

What is this PR doing?

This PR adds escaping for backslash characters in response headers.

What problem is it solving?

Unescaped backslashes in response headers break the JSON structure inside headers.json which causes parsing on headers to break Playground.

How is the problem addressed?

Backslashes will be escaped before being sent to the client.

Testing Instructions

  • Ensure tests pass

@bgrgicak bgrgicak closed this Feb 23, 2024
@bgrgicak bgrgicak force-pushed the fix/1046-sapi-header-escaping branch from 36e7fcb to 7a1a304 Compare February 23, 2024 11:47
@bgrgicak bgrgicak reopened this Feb 23, 2024
@bgrgicak bgrgicak requested a review from adamziel February 23, 2024 11:48
@bgrgicak bgrgicak self-assigned this Feb 23, 2024
@bgrgicak bgrgicak added [Type] Bug An existing feature does not function as intended [Feature] PHP.wasm [Aspect] Networking labels Feb 23, 2024
@bgrgicak bgrgicak marked this pull request as ready for review February 23, 2024 11:48
@adamziel
Copy link
Collaborator

The fix works, the added test pass, and the only test failure is a known flaky test. Let's merge! 🎉 Thank you so much @bgrgicak!

@adamziel adamziel merged commit a91dfe5 into trunk Feb 23, 2024
4 of 5 checks passed
@adamziel adamziel deleted the fix/1046-sapi-header-escaping branch February 23, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Aspect] Networking [Feature] PHP.wasm [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wasm_sapi_send_headers produces broken JSON due to incorrect escaping
2 participants