asgiref icon indicating copy to clipboard operation
asgiref copied to clipboard

RE: Add HTTP Trailers

Open sam-kleiner opened this issue 1 year ago • 1 comments

There is already a PR open regarding this. I wanted to open this to add options to the discussion. I did the uvicorn implementation.

As stated in the other proposal PR this works a bit differently. This adds a new message type http.response.trailers and a new trailers bool property to http.response.start. IMO this simplifies the implementation.

My original POC did not account for chunked trailers but this would be easy to add with a more_trailers property similar to the more_body property.

Personally I like the more_body being set to false when the body is done and trailers being sent after. It makes more sense to me, but at the end of the day if any trailers get added I will be happy.

sam-kleiner avatar Aug 17 '22 14:08 sam-kleiner

I do like this in general, but I feel like we need a more_trailers in there because people are inevitably going to want that?

andrewgodwin avatar Aug 20 '22 22:08 andrewgodwin