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

Private (conceptual) trailer support #980

Open
annevk opened this issue Dec 11, 2019 · 10 comments
Open

Private (conceptual) trailer support #980

annevk opened this issue Dec 11, 2019 · 10 comments

Comments

@annevk
Copy link
Member

annevk commented Dec 11, 2019

To support something like https://w3c.github.io/server-timing/#server-timing-header-parsing-algorithm the response concept needs trailer support. I'm not sure if we need to add conceptual request trailer support as part of solving this issue as I'm not sure there are any dependencies. But any design should work for them as well, I suppose.

Per HTTP semantics trailers (a header list) can arrive "concurrently" with a message body and they can arrive multiple times (i.e., an asynchronous sequence of header lists). Server Timing does not appear to account for that.

(See #772 and #979 for prior takes on response trailer support.)

annevk added a commit that referenced this issue Dec 12, 2019
As noted in #772 (comment) the current way it is exposed subsets what HTTP supports and therefore does not feel like a good starting point. Both for the internal and public API.

Additionally, the public-facing API has not seen interest from implementers, at least for the past year and a half.

Tests: web-platform-tests/wpt#20720.

Closes #772. Follow-ups: #980 and #981.
@noamr
Copy link
Contributor

noamr commented Mar 1, 2022

What's the current implementor interest around supporting trailers, and in particular for Server-Timing? There are no current WPTs supporting this. @yoavweiss can you help loop in the right people to respond?

@jasnell
Copy link

jasnell commented Mar 1, 2022

I do think it would be good to revisit support for HTTP trailers in responses and requests in general, particularly in light of things like https://aws.amazon.com/blogs/aws/new-additional-checksum-algorithms-for-amazon-s3/ which make direct use of trailers in both directions.

@yoavweiss
Copy link
Collaborator

yoavweiss commented Mar 2, 2022

/cc @ddragana @mcmanus - for their opinions from the Mozilla side as an implementer as well as from Fastly as a user.

From Chromium, I haven't heard of anyone interested in implementing trailers, even if just for Server-Timing. (but I'll ask around, as it's been a while)

@jasnell - does your use case require Server-Timing trailer support, or trailers in general?

@yoavweiss
Copy link
Collaborator

I dug up #34 which contains a bunch of arguments against trailer support. I'm not sure if those are still current, as it's been a while.

@noamr
Copy link
Contributor

noamr commented Mar 2, 2022

I dug up #34 which contains a bunch of arguments against trailer support. I'm not sure if those are still current, as it's been a while.

I read the thread. The arguments against mostly don't apply to Server-Timing. A lot of the argument are against exposing the trailers in fetch() / XHR, and that in many other standard header cases trailers would be nonsensical or harmful.

However timing info was presented there as an actual valid specific use case.

@yoavweiss
Copy link
Collaborator

Reading @davidben's reply there, I agree that Server-Timing exposure falls into the "I understand what this would mean" bucket. At the same time, the implementation complexity arguments (e.g. requiring trailer support implementation in the HTTP cache) still stand AFAIK.

@mnot
Copy link
Member

mnot commented Mar 2, 2022

Caches are allowed to drop trailers.

@jasnell
Copy link

jasnell commented Mar 2, 2022

@yoavweiss:

does your use case require Server-Timing trailer support, or trailers in general?

Trailers in general... but don't take it as a We Must Have It type of thing. We are looking at whether or not we could ever support that new AWS spec without resorting to non-standard extensions and it's looking most likely that we won't.

@yoavweiss
Copy link
Collaborator

Caches are allowed to drop trailers.

@mnot - while true, if we were to expose Server-Timing in trailers, whether caches drop them or not would be extremely web visible..

@annevk
Copy link
Member Author

annevk commented Mar 3, 2022

I wonder what Firefox does. @ddragana? I wouldn't mind specifying that they are always dropped, but I haven't thought through the implications.

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

No branches or pull requests

5 participants