23#include <nghttp2/nghttp2ver.h>
35#define H2_USE_PIPES (APR_FILES_AS_SOCKETS && APR_VERSION_AT_LEAST(1,6,0))
38#if AP_MODULE_MAGIC_AT_LEAST(20120211, 129)
39#define H2_USE_POLLFD_FROM_CONN 1
41#define H2_USE_POLLFD_FROM_CONN 0
46#if H2_USE_PIPES && defined(NGHTTP2_VERSION_NUM) && NGHTTP2_VERSION_NUM >= 0x012200 && APR_VERSION_AT_LEAST(1,7,0)
47#define H2_USE_WEBSOCKETS 1
49#define H2_USE_WEBSOCKETS 0
58#define H2_ERR_NO_ERROR (0x00)
59#define H2_ERR_PROTOCOL_ERROR (0x01)
60#define H2_ERR_INTERNAL_ERROR (0x02)
61#define H2_ERR_FLOW_CONTROL_ERROR (0x03)
62#define H2_ERR_SETTINGS_TIMEOUT (0x04)
63#define H2_ERR_STREAM_CLOSED (0x05)
64#define H2_ERR_FRAME_SIZE_ERROR (0x06)
65#define H2_ERR_REFUSED_STREAM (0x07)
66#define H2_ERR_CANCEL (0x08)
67#define H2_ERR_COMPRESSION_ERROR (0x09)
68#define H2_ERR_CONNECT_ERROR (0x0a)
69#define H2_ERR_ENHANCE_YOUR_CALM (0x0b)
70#define H2_ERR_INADEQUATE_SECURITY (0x0c)
71#define H2_ERR_HTTP_1_1_REQUIRED (0x0d)
73#define H2_HEADER_METHOD ":method"
74#define H2_HEADER_METHOD_LEN 7
75#define H2_HEADER_SCHEME ":scheme"
76#define H2_HEADER_SCHEME_LEN 7
77#define H2_HEADER_AUTH ":authority"
78#define H2_HEADER_AUTH_LEN 10
79#define H2_HEADER_PATH ":path"
80#define H2_HEADER_PATH_LEN 5
81#define H2_HEADER_PROTO ":protocol"
82#define H2_HEADER_PROTO_LEN 9
86#define H2_FRAME_HDR_LEN 9
89#define H2_DATA_CHUNK_SIZE ((16*1024) - 100 - H2_FRAME_HDR_LEN)
92#define H2_MAX_PADLEN 256
94#define H2_INITIAL_WINDOW_SIZE ((64*1024)-1)
96#define H2_STREAM_CLIENT_INITIATED(id) (id&0x01)
98#define H2_ALEN(a) (sizeof(a)/sizeof((a)[0]))
100#define H2MAX(x,y) ((x) > (y) ? (x) : (y))
101#define H2MIN(x,y) ((x) < (y) ? (x) : (y))
190#define H2_HTTP_STATUS_UNSET (0)
198#define H2_HDR_CONFORMANCE "http2-hdr-conformance"
199#define H2_HDR_CONFORMANCE_UNSAFE "unsafe"
200#define H2_PUSH_MODE_NOTE "http2-push-mode"
203#if AP_MODULE_MAGIC_AT_LEAST(20211221, 6)
204#define AP_HAS_RESPONSE_BUCKETS 1
207#define AP_HAS_RESPONSE_BUCKETS 0
const char apr_size_t len
APR Versioning Interface.
apr_brigade_flush void * ctx
@ H2_DEPENDANT_INTERLEAVED
apr_status_t h2_io_data_cb(void *ctx, const char *data, apr_off_t len)
struct h2_stream * h2_stream_get_fn(struct h2_session *session, int stream_id)
int h2_stream_pri_cmp_fn(int stream_id1, int stream_id2, void *session)
const char * H2_MAGIC_TOKEN
struct h2_session * session