wired
libc-free QUIC/HTTP3 SDK in C for x86_64-linux
Loading...
Searching...
No Matches
wired_h3reqdrive_req Struct Reference

RFC 9114 4.1 / 4.3.1, RFC 9204 4.5: recovered request pseudo-headers. More...

#include <request_drive.h>

Data Fields

const u8 * method
 :method value (static-table view or scratch)
usz method_len
 method length in octets
const u8 * scheme
 :scheme value (static-table view or scratch)
usz scheme_len
 scheme length in octets
const u8 * authority
 :authority value (static-table view or scratch)
usz authority_len
 authority length in octets
const u8 * path
 :path value (static-table view or scratch)
usz path_len
 path length in octets
const u8 * protocol
 RFC 9220 3: :protocol value, 0 if absent.
usz protocol_len
 protocol length in octets, 0 if absent
const u8 * body
 request body view into stream_data, 0 if none
usz body_len
 0 for GET and other bodyless requests
h3_priority priority
 RFC 9218 5 priority header (defaults).
const u8 * origin
 regular origin header value (static-table view or scratch), 0 if absent (RFC 9220 3 / WebTransport draft SS3.6 origin check applies only when present)
usz origin_len
 origin length in octets, 0 if absent
u8 wt_avail [256]
 WebTransport subprotocol negotiation: the raw wt-available-protocols header value (an RFC 8941 sf-list of sf-strings, the client's offer in preference order), copied verbatim – not a scratch view like origin, so the offer survives past the decode's scratch lifetime.
usz wt_avail_len
 wt-available-protocols length in octets, 0 if absent
u8 cookie [512]
 RFC 9114 4.2.1: multiple cookie field lines, reassembled with the "; " delimiter into a single value (as if the peer had sent one HTTP/1.1-style Cookie header) before the application ever sees it.
usz cookie_len
 cookie length in octets, 0 if absent
int expect_continue
 RFC 9110 10.1.1: 1 if a regular expect field carried exactly "100-continue" (case-sensitive; every real sender spells it lowercase, matching RFC 9114 4.2's field-name-lowercase requirement's spirit), 0 otherwise – the condition the server's 100 (Continue) interim response path gates on.
int frame_unexpected
 RFC 9114 7.2.5/7.2.8 (9114-067/9114-073): 1 if the request stream carried a frame this endpoint must reject outright before HEADERS was reached – PUSH_PROMISE (a server-to-client frame this server-only SDK never sends, so any received instance is unexpected) or an HTTP/2-only reserved type (0x02/0x06/0x08/0x09).
u16 too_large_status
 RFC 9110 15.5.14 / RFC 6585 5: 413 (body) or 431 (header section) when the request stream overflowed the server's per-request buffer – every other field is then unset and the server answers with this status instead of calling the application.
const u8 * hdr_base
 RFC 9114 4.2: the first WIRED_H3REQDRIVE_MAX_HDRS regular (non-pseudo) header field lines in received order, except cookie, origin and wt-available-protocols, which wired_http_req_header serves from their dedicated fields above.
wired_h3reqdrive_hdr hdrs [WIRED_H3REQDRIVE_MAX_HDRS]
 the kept headers, in received order (see hdr_base)
usz hdr_count
 entries used in hdrs
u64 qpack_ric
 RFC 9204 4.5.1.1: the field section's Required Insert Count – non-zero means the decoder owes a Section Acknowledgment (4.4.1).
u64 qpack_trailer_ric
 RFC 9204 2.2.2.1: the trailer section's Required Insert Count (0 with no trailer); a non-zero one owes its own Section Acknowledgment.
int qpack_failed
 RFC 9204 4.5.1 / 2.1.2: 1 if the section prefix could not be decoded (an invalid Required Insert Count or Base, or one past the inserts received while no stream may block): a connection error of type QPACK_DECOMPRESSION_FAILED rather than a malformed request.

Detailed Description

RFC 9114 4.1 / 4.3.1, RFC 9204 4.5: recovered request pseudo-headers.

Each value is either a static-table view or a copy in the caller-supplied scratch buffer, depending on how the peer encoded the field line.

Field Documentation

◆ cookie

u8 wired_h3reqdrive_req::cookie[512]

RFC 9114 4.2.1: multiple cookie field lines, reassembled with the "; " delimiter into a single value (as if the peer had sent one HTTP/1.1-style Cookie header) before the application ever sees it.

A reassembled value that does not fit is truncated to what fits.

◆ frame_unexpected

int wired_h3reqdrive_req::frame_unexpected

RFC 9114 7.2.5/7.2.8 (9114-067/9114-073): 1 if the request stream carried a frame this endpoint must reject outright before HEADERS was reached – PUSH_PROMISE (a server-to-client frame this server-only SDK never sends, so any received instance is unexpected) or an HTTP/2-only reserved type (0x02/0x06/0x08/0x09).

Set by find_headers (request_parse.c) via h3_frame_recv_ok; the caller aborts the stream with H3_FRAME_UNEXPECTED instead of the H3_REQUEST_INCOMPLETE an ordinary decode failure gets.

◆ hdr_base

const u8* wired_h3reqdrive_req::hdr_base

RFC 9114 4.2: the first WIRED_H3REQDRIVE_MAX_HDRS regular (non-pseudo) header field lines in received order, except cookie, origin and wt-available-protocols, which wired_http_req_header serves from their dedicated fields above.

Bytes are copied into scratch at decode time (a dynamic-table entry can change afterwards, RFC 9204 2.1.1/3.2); a line that no longer fits the scratch is skipped. hdr_base is the scratch the positions index.

◆ too_large_status

u16 wired_h3reqdrive_req::too_large_status

RFC 9110 15.5.14 / RFC 6585 5: 413 (body) or 431 (header section) when the request stream overflowed the server's per-request buffer – every other field is then unset and the server answers with this status instead of calling the application.

0 otherwise.

◆ wt_avail

u8 wired_h3reqdrive_req::wt_avail[256]

WebTransport subprotocol negotiation: the raw wt-available-protocols header value (an RFC 8941 sf-list of sf-strings, the client's offer in preference order), copied verbatim – not a scratch view like origin, so the offer survives past the decode's scratch lifetime.

A value that does not fit is dropped (treated as absent).


The documentation for this struct was generated from the following file: