Closed zostay closed 9 years ago
After further research, the trailing headers bit does not really need to be handled specially for HTTP/1.1, but it does have to be handled specially for HTTP/2 because they must be framed within a HEADER frame whereas the rest of the body will be framed as DATA.
I have made it so that the application may emit headers like [ Content-MD5 => '...' ] so that both cases can be handled without the application having to make a fuss.
Certain responses involve trailing headers, such as
Transfer-Encoding: chunked
. Right now, we'd handle this by allowing the application to send additional headers or chunking size information itself. Do we want to allow for some sort of meta-information to be emitted with each Blob returned by the application describing additional protocol details like this or just keep the details in the application, which could have negative consequences on the server's connection to the client if the application does it wrong.