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

How is text/event-stream checked? #7630

Open
domenic opened this issue Feb 17, 2022 · 0 comments
Open

How is text/event-stream checked? #7630

domenic opened this issue Feb 17, 2022 · 0 comments
Labels
clarification Standard could be clearer topic: eventsource

Comments

@domenic
Copy link
Member

domenic commented Feb 17, 2022

Spinning off from https://github.com/whatwg/html/pull/7553/files#r808234276

The spec currently says

HTTP 200 OK responses with a [Content-Type](https://html.spec.whatwg.org/commit-snapshots/b3a49bcf51d5cf39f6233b752f631940a44677ab/#content-type) header specifying the type [text/event-stream](https://html.spec.whatwg.org/commit-snapshots/b3a49bcf51d5cf39f6233b752f631940a44677ab/#text/event-stream), ignoring any MIME type parameters, must be processed line by line as described below.

HTTP 200 OK responses that have a Content-Type specifying an unsupported type, or that have no Content-Type at all, must cause the user agent to fail the connection.

The exact phrasing will move around a bit as part of #7553 but we're decided not to try to make it more rigorous yet. So:

What about text/EVENT-stream? What about multiple Content-Type headers? What about whitespace?

The proper architecture here is to use https://fetch.spec.whatwg.org/#concept-header-extract-mime-type and compare the essences. We should do that. But we should also write web platform tests for the weird cases, as part of that work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer topic: eventsource
Development

No branches or pull requests

1 participant