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

Don't drop leading spaces in SSE responses #600

Merged
merged 3 commits into from
Dec 12, 2021
Merged

Don't drop leading spaces in SSE responses #600

merged 3 commits into from
Dec 12, 2021

Conversation

SabrinaJewson
Copy link
Contributor

Motivation

Currently a payload that starts with a space will be serialized as data: payload, which the browser will then interpret as not having a leading space.

Solution

Always prefix potentially space-prefixed values with a space after the colon.

@davidpdrsn davidpdrsn enabled auto-merge (squash) December 12, 2021 16:06
@davidpdrsn davidpdrsn merged commit d9bf100 into tokio-rs:main Dec 12, 2021
@SabrinaJewson SabrinaJewson deleted the sse-dont-drop-leading-spaces branch December 12, 2021 16:11
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

Successfully merging this pull request may close these issues.

2 participants