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

Use HTTP Trailer for errors that arise after response starts #302

Open
dlindhol opened this issue Jun 24, 2021 · 1 comment
Open

Use HTTP Trailer for errors that arise after response starts #302

dlindhol opened this issue Jun 24, 2021 · 1 comment

Comments

@dlindhol
Copy link
Member

Since a LaTiS server streams data as it is being read, an error could arise after starting a 200 response. We could use a trailer to indicate an error to the user.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Trailer
https://datatracker.ietf.org/doc/html/rfc2616#section-14.40

Also consider trailer use for other features.

@lindholc
Copy link
Member

It looks like there's very little support for HTTP/1.1 trailers in the wild. You can add trailers in http4s, but I didn't see a way to set the value of a trailer based on the stream. It also looks like most browsers don't fully support trailers, so many of our clients wouldn't be able to see them even if we could add them.

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