Is trailers frame after data frame possible in HTTP/2?

298 views Asked by At

Is it possible in HTTP/2 that a data frame is received with END_STREAM flag, and later a trailers frame will be received? In other words, will a frame with END_STREAM also indicate that no other frame will be sent? Also, must a trailers frame (Which is practically headers frame) set END_STREAM?

1

There are 1 answers

0
sbordet On

Is it possible in HTTP/2 that a data frame is received with END_STREAM flag, and later a trailers frame will be received?

No. When a frame with END_STREAM is received, the stream enters the "half-closed (remote)" state.

This is specified in section 5.1 of RFC 7540, where it says:

half-closed (remote): A stream that is "half-closed (remote)" is no longer being used by the peer to send frames. In this state, an endpoint is no longer obligated to maintain a receiver flow-control window. If an endpoint receives additional frames, other than WINDOW_UPDATE, PRIORITY, or RST_STREAM, for a stream that is in this state, it MUST respond with a stream error (Section 5.4.2) of type STREAM_CLOSED.