4 ms·
I believe trailers are because you could start streaming a response and end up having an error than you need to communicate out of band. Hopefully someone has a
by mentat 8y ago
I believe trailers are because you could start streaming a response and end up having an error than you need to communicate out of band. Hopefully someone has a better answer though.
- aktau 8y agoI've been trying to read the HTTP2 spec and I can't figure out whether it's allowable to return or modify the HTTP(2) status code in a trailer instead of in the header. After some re-readings, I decided it wasn't allowed. But then, gRPC definitely needs to be able to signal an error even after it has already streamed data. So gRPC would need to use some end-of-connection message, like a trailer.