question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Protocol: Support for HTTP trailers

See original GitHub issue

It doesn’t seem like the current ASGI specification allows applications to send HTTP trailers in their response, since it is indicated that servers should ignore any further messages on a channel once mode_body becomes false in a http.response.body message. This prevents application that stream their content from sending additionnal response information as trailers when it may not be known before the body has begun transfering, regarding things like caching, timing (Server-Timing), integrity check (Content-MD5, obsolete), digital signature (Signature, draft), etc.

WSGI doesn’t support it and I’m reading that overall support for them in various user agents tends to be flaky most of the time, but I couldn’t find any information regarding the omission of trailers from ASGI (whether deliberate or not) and I would like to know if there are any plans to add them at some point in the future, perhaps as an extension.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
andrewgodwincommented, Aug 10, 2022

Yes, the use of them by GRPC is probably enough of a reason at this point - trust those folks to go resurrect a dusty old part of the HTTP spec 😃

0reactions
Kludexcommented, Aug 10, 2022

@andrewgodwin Given your last comment, should we reopen this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Trailer - HTTP - MDN Web Docs - Mozilla
The Trailer response header allows the sender to include additional fields at the end of chunked messages in order to supply metadata that ......
Read more >
Supercharging Server Timing with HTTP trailers - Fastly
Fastly supports sending Server Timing trailers by default for HTTP/2. We also support sending them for HTTP/1.1 over TLS, but not by default,...
Read more >
Little Known ASP.NET Core Features - HTTP Trailers
In every ASP.NET Core release, there are small features that nobody talks about. This post talks about one of such features - HTTP...
Read more >
Trailer HTTP Header: Syntax, Directive, Examples - Holistic SEO
The Trailer HTTP Header is a response header that indicates the presence of a specified set of header fields in the trailer of...
Read more >
HTTP Trailers in Jetty - Webtide
Other protocols such as gRPC make use of the trailers and therefore can be mapped on top of HTTP. The Servlet APIs, up...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found