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

Trailers in Semantics #220

Closed
3 tasks done
mnot opened this issue Apr 12, 2019 · 9 comments
Closed
3 tasks done

Trailers in Semantics #220

mnot opened this issue Apr 12, 2019 · 9 comments

Comments

@mnot
Copy link
Member

mnot commented Apr 12, 2019

Semantics barely mentions trailers, instead leaving much of their definition to messaging -- even though they're part of the version-independent definition of HTTP.

  • move most of the non-version-specific mechanics of trailers from messaging 7.1.2 Chunked Trailer Part into Semantics
  • explicitly list trailers as part of how HTTP works in semantics 2.1
  • adjust semantics section 4 to clearly refer to fields generically (yes, I did that) and two have two subtypes; header fields and trailer fields
@mnot
Copy link
Member Author

mnot commented Sep 2, 2019

Waiting on resolution of #16 before doing the last item.

@royfielding
Copy link
Member

I am working on this now but keep finding larger structural editorial concerns that get in the way. Specifically, the message abstraction stuff really needs to be described earlier (in architecture) and then the message abstraction section is just talking about header fields and then we can add a section on trailer fields along with the definition of the Trailer header field. In progress, based on branch mnot-16.

@royfielding
Copy link
Member

Ready for review in #219

@royfielding
Copy link
Member

Now that #219 has been merged, this might be ready to close or at least move on to the next step. I think we should open new issues for specific fields to be defined as usable in a trailer section. We should also generically define the closing headers frame in h2 as being a trailer section.

@royfielding
Copy link
Member

This is still open and might as well be used for further discussion of mid-stream trailers, if needed.

@annevk
Copy link
Contributor

annevk commented Nov 21, 2019

Does mid-stream trailers mean you could send multiple "header blocks" of trailers? In an API, would it then make sense to expose response trailers as a (streaming) sequence of header blocks that arrive concurrently with the response body?

@MikeBishop
Copy link
Contributor

We discussed this in Singapore; I believe that would be a reasonable presentation by an API, yes. I think it basically amounts to saying that headers precede the body, while the trailers are a sequence of subsequent header blocks that might arrive any time from the end of the headers to the end of the stream.

Intermediaries might collect them and put them all at the end, or drop them, or put them in the headers as is already the case with trailers.

@royfielding
Copy link
Member

Does mid-stream trailers mean you could send multiple "header blocks" of trailers?

Yes

In an API, would it then make sense to expose response trailers as a (streaming) sequence of header blocks that arrive concurrently with the response body?

I expect that some applications would want an immediate notification/promise like API for specific field names received, while others might want a dictionary structure at the end of message processing. For example, a progress meter fed by trailer data would only be useful if it could read each field as it is received, whereas a cache validator might only be read by a post-render cleanup process outside the critical path.

@mnot
Copy link
Member Author

mnot commented Feb 3, 2020

I think this is done with #111. @royfielding please open a separate issue for mid-stream trailers.

@mnot mnot closed this as completed Feb 3, 2020
@mnot mnot mentioned this issue Feb 5, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants