Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

TODO: Properly support HTTP/3 Trailer #210

Open
jasnell opened this issue Dec 3, 2019 · 2 comments
Open

TODO: Properly support HTTP/3 Trailer #210

jasnell opened this issue Dec 3, 2019 · 2 comments

Comments

@jasnell
Copy link
Member

jasnell commented Dec 3, 2019

HTTP/3 Trailing headers are not yet fully supported

@jasnell
Copy link
Member Author

jasnell commented Jan 15, 2020

Starting to work through the details of how trailing headers should work on the API level, which will drive how they function on the lower bits...

Two specific bits:

  • Ending a stream without sending trailing headers will close the writable side without sending any trailing headers.
  • Calling submitTrailers() on an open stream will have the side effect of closing the writable side of the stream, so it should only be called when all data has been sent.

Therefore, there are two basic scenarios:

No trailers:

stream.write('hello ')
stream.end('world')

// Calling stream.submitTrailers() at this point would throw

With trailers:

stream.write('hello ')
stream.write('world')
stream.submitTrailers({ foo: 'bar' })  // Closes the stream! like calling end()

// Calling stream.write() at this point would throw

@jasnell
Copy link
Member Author

jasnell commented Jan 21, 2020

Trailers are working as of #288 but there are still a number of API details to work through.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant