HTTP/2 does not require the Trailer header to be there
Maaarcocr opened this issue · comments
It is my understanding that HTTP/2 does not necessary require the Trailer
header to be there in order to have trailer headers. In https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Trailer it seems to suggest that such header is defined in the specification of HTTP/1.1
I've been trying to make a grpc client that uses async-http as the transport and while trying to read back the response I get the Unable to process headers
error that gets thrown here
This is due to the lack of the Trailer
header in the initial headers, which then make it throw when we get some trailers but @trailer
is not defined.
Given that HTTP/2 does not require such header to be there, could we change the logic in stream.rb
such that it just reads the trailers and append them in the headers?