quiche icon indicating copy to clipboard operation
quiche copied to clipboard

h3: add support for additional HEADERS

Open LPardue opened this issue 4 years ago • 2 comments

HTTP/3 request and response message exchanges allow multiple HEADERS frames to be sent, which allows for trailer sections or non-final responses. Previously, quiche has only supported generating a single HEADERS frame per request or response, and didn't support receiving them.

This change adds support for sending and receiving multiple HEADERS frames on a request stream. It enforces the sequencing rules defined in https://datatracker.ietf.org/doc/html/draft-ietf-quic-http-34#section-4.1. Sending additional HEADERS is done using the new send_additional_headers() method. On the receive side, rather than add a new Event enum variant for these additional uses of HEADERS, this change reuses Event::Headers. Previosuly, this event included a has_body boolean, which has been renamed to more_frames to better align with how HTTP/3 streams work.

LPardue avatar Aug 24 '21 01:08 LPardue

Oh wow. The build failure is in data_event_rearm, there's a part of the test that says // Send more data, then HEADERS, then more data. - that isn't a valid sequence, so I guess this change has revealed a latent bug. Can we just remove that part of the test, or does it invalidate the rearm code/test?

LPardue avatar Aug 24 '21 01:08 LPardue

@ghedo since there is no way to send DATA frames after headers, I tried addressing the broken test by sending more data on a different stream and basically interleaving operations to see if the DATA event rearms properly.

A different approach might be, if we add an event for PRIORITY_UPDATE, to interleave that with DATA events. If we like the sound of that I can replace the fix data_event_rearm test commit with an alternative. Or we change it later, or whatever.

LPardue avatar Jan 27 '22 15:01 LPardue