41#define H2_CONFIG_GET(a, b, n) \
42 (((a)->n == DEF_VAL)? (b) : (a))->n
44#define H2_CONFIG_SET(a, n, v) \
47#define CONFIG_CMD_SET(cmd,dir,var,val) \
48 h2_config_seti(((cmd)->path? (dir) : NULL), h2_config_sget((cmd)->server), var, val)
50#define CONFIG_CMD_SET64(cmd,dir,var,val) \
51 h2_config_seti64(((cmd)->path? (dir) : NULL), h2_config_sget((cmd)->server), var, val)
232 const char *
s = x? x :
"unknown";
577 return "value must be > 0";
588 return "value must be >= 1024";
599 return "value must be > 0";
610 return "value must be > 0";
622 return "Invalid idle limit value";
636 return "value must be >= 1024";
647 return "value must be 0 or larger";
660 "H2SessionExtraFiles is obsolete and will be ignored");
669 "%s: this feature has been disabled and the directive "
670 "to enable it is ignored.",
parms->cmd->name);
686 return "value must be On or Off";
699 return "value must be On or Off";
710 return "HTTP/2 WebSockets are not supported on this platform";
712 return "HTTP/2 WebSockets are not supported in this server version";
719 return "value must be On or Off";
734 return "1st argument must be a mime-type, like 'text/css' or '*'";
751 return "dependency 'Before' does not allow a weight";
759 return "dependency must be one of 'After', 'Before' or 'Interleaved'";
790 return "value must be On or Off";
804 return "value must be On or Off";
828 return "value must be >= 0";
831 return "value must a power of 2";
833 if (
val > (1 << 15)) {
834 return "value must <= 65536";
851 return "value must be On or Off";
861 new->uri_ref =
push->uri_ref;
862 new->critical =
push->critical;
880 return "too many parameter";
889 return "unknown last parameter";
908 return "Early Hint header name must not be empty";
910 return "Early Hint header value must not be empty";
914 return "Early Hint header value must not be empty/only space";
916 return "Early Hint header value contains invalid characters";
940 else return "value must be On or Off";
945 "H2EarlyHints = %d on path %s",
val,
cmd->path);
956 return "number of bits must be >= 0";
959 return "number of bits must be <= 8";
976 return "value must be On or Off";
987 return "Invalid timeout value";
1004 return "value must be On or Off";
1025#define AP_END_CMD AP_INIT_TAKE1(NULL, NULL, NULL, RSRC_CONF, NULL)
1029 RSRC_CONF,
"maximum number of open streams per session"),
1031 RSRC_CONF,
"window size on client DATA"),
1033 RSRC_CONF,
"minimum number of worker threads per child"),
1035 RSRC_CONF,
"maximum number of worker threads per child"),
1037 RSRC_CONF,
"maximum number of idle seconds before a worker shuts down"),
1039 RSRC_CONF,
"maximum number of bytes buffered in memory for a stream"),
1041 RSRC_CONF,
"disabled, this directive has no longer an effect."),
1043 RSRC_CONF,
"off to not impose RFC 7540 restrictions on TLS"),
1047 RSRC_CONF,
"on to enable direct HTTP/2 mode"),
1049 RSRC_CONF,
"number of extra file a session might keep open (obsolete)"),
1051 RSRC_CONF,
"number of bytes on TLS connection before doing max writes"),
1053 RSRC_CONF,
"seconds of idle time on TLS before shrinking writes"),
1057 RSRC_CONF,
"define priority of PUSHed resources per content type"),
1065 RSRC_CONF,
"on to enable interim status 103 responses"),
1069 RSRC_CONF,
"set stream output buffer on/off"),
1073 RSRC_CONF,
"maximum number of bytes in a single HTTP/2 DATA frame"),
1077 OR_FILEINFO,
"Enables forward proxy requests via HTTP/2"),
1079 RSRC_CONF,
"off to disable WebSockets over HTTP/2"),
Apache Multi-Processing Module library.
const char apr_size_t len
APR general purpose library routines.
apr_array_append(apr_pool_t *p, const apr_array_header_t *first, const apr_array_header_t *second)
#define AP_INIT_TAKE123(directive, func, mconfig, where, help)
#define AP_INIT_TAKE1(directive, func, mconfig, where, help)
#define ap_get_module_config(v, m)
#define AP_INIT_TAKE23(directive, func, mconfig, where, help)
#define AP_INIT_TAKE2(directive, func, mconfig, where, help)
apr_dbd_transaction_t int mode
const char * ap_scan_http_field_content(const char *ptr)
apr_status_t ap_timeout_parameter_parse(const char *timeout_parameter, apr_interval_time_t *timeout, const char *default_time_unit)
const char int apr_pool_t * pool
int strcasecmp(const char *a, const char *b)
apr_vformatter_buff_t * c
#define apr_pcalloc(p, size)
apr_int64_t apr_interval_time_t
#define apr_time_from_sec(sec)
apr_status_t ap_mpm_query(int query_code, int *result)
#define AP_MPMQ_MAX_THREADS
@ H2_DEPENDANT_INTERLEAVED
#define H2_INITIAL_WINDOW_SIZE
static void h2_srv_config_seti(h2_config *conf, h2_config_var_t var, int val)
static h2_dir_config defdconf
static const char * h2_conf_add_push_priority(cmd_parms *cmd, void *_cfg, const char *ctype, const char *sdependency, const char *sweight)
#define H2_CONFIG_SET(a, n, v)
apr_array_header_t * h2_config_push_list(request_rec *r)
apr_int64_t h2_config_sgeti64(server_rec *s, h2_config_var_t var)
static h2_config * h2_config_sget(server_rec *s)
static const char * h2_conf_set_proxy_requests(cmd_parms *cmd, void *dirconf, const char *value)
static void add_push(apr_array_header_t **plist, apr_pool_t *pool, h2_push_res *push)
static void h2_config_seti64(h2_dir_config *dconf, h2_config *conf, h2_config_var_t var, apr_int64_t val)
apr_int64_t h2_config_cgeti64(conn_rec *c, h2_config_var_t var)
static const char * h2_conf_set_tls_cooldown_secs(cmd_parms *cmd, void *dirconf, const char *value)
void * h2_config_create_dir(apr_pool_t *pool, char *x)
void * h2_config_create_svr(apr_pool_t *pool, server_rec *s)
static const char * h2_conf_set_tls_warmup_size(cmd_parms *cmd, void *dirconf, const char *value)
static const char * h2_conf_add_early_hint(cmd_parms *cmd, void *dirconf, const char *name, const char *value)
static const char * h2_conf_set_websockets(cmd_parms *cmd, void *dirconf, const char *value)
const command_rec h2_cmds[]
static const char * h2_conf_add_push_res(cmd_parms *cmd, void *dirconf, const char *arg1, const char *arg2, const char *arg3)
const struct h2_priority * h2_cconfig_get_priority(conn_rec *c, const char *content_type)
int h2_config_rgeti(request_rec *r, h2_config_var_t var)
#define CONFIG_CMD_SET64(cmd, dir, var, val)
static const char * h2_conf_set_window_size(cmd_parms *cmd, void *dirconf, const char *value)
static const char * h2_conf_set_max_workers(cmd_parms *cmd, void *dirconf, const char *value)
static const char * h2_conf_set_session_extra_files(cmd_parms *cmd, void *dirconf, const char *value)
static const char * h2_conf_set_output_buffer(cmd_parms *cmd, void *dirconf, const char *value)
static const char * h2_conf_set_stream_timeout(cmd_parms *cmd, void *dirconf, const char *value)
static apr_int64_t h2_dir_config_geti64(const h2_dir_config *conf, h2_config_var_t var)
void * h2_config_merge_svr(apr_pool_t *pool, void *basev, void *addv)
static const char * h2_conf_set_min_workers(cmd_parms *cmd, void *dirconf, const char *value)
static const char * h2_conf_set_max_data_frame_len(cmd_parms *cmd, void *dirconf, const char *value)
static const char * h2_conf_set_modern_tls_only(cmd_parms *cmd, void *dirconf, const char *value)
int h2_config_geti(request_rec *r, server_rec *s, h2_config_var_t var)
#define CONFIG_CMD_SET(cmd, dir, var, val)
static const char * h2_conf_set_stream_max_mem_size(cmd_parms *cmd, void *dirconf, const char *value)
static const char * h2_conf_set_padding(cmd_parms *cmd, void *dirconf, const char *value)
static const char * h2_conf_set_push_diary_size(cmd_parms *cmd, void *dirconf, const char *value)
static void * h2_config_merge(apr_pool_t *pool, void *basev, void *addv)
static void h2_config_seti(h2_dir_config *dconf, h2_config *conf, h2_config_var_t var, int val)
static void h2_srv_config_seti64(h2_config *conf, h2_config_var_t var, apr_int64_t val)
static const char * h2_conf_set_max_streams(cmd_parms *cmd, void *dirconf, const char *value)
static const char * h2_conf_set_early_hints(cmd_parms *cmd, void *dirconf, const char *value)
static const char * h2_conf_set_serialize_headers(cmd_parms *parms, void *dirconf, const char *value)
static const char * h2_conf_set_copy_files(cmd_parms *cmd, void *dirconf, const char *value)
void h2_get_workers_config(server_rec *s, int *pminw, int *pmaxw, apr_time_t *pidle_limit)
static const char * h2_conf_set_direct(cmd_parms *cmd, void *dirconf, const char *value)
void * h2_config_merge_dir(apr_pool_t *pool, void *basev, void *addv)
static const char * h2_conf_set_upgrade(cmd_parms *cmd, void *dirconf, const char *value)
apr_table_t * h2_config_early_headers(request_rec *r)
apr_int64_t h2_config_geti64(request_rec *r, server_rec *s, h2_config_var_t var)
static const char * h2_conf_set_push(cmd_parms *cmd, void *dirconf, const char *value)
static const char * h2_conf_set_max_worker_idle_limit(cmd_parms *cmd, void *dirconf, const char *value)
#define H2_CONFIG_GET(a, b, n)
void h2_config_init(apr_pool_t *pool)
apr_int64_t h2_config_rgeti64(request_rec *r, h2_config_var_t var)
static const h2_dir_config * h2_config_rget(request_rec *r)
int h2_config_cgeti(conn_rec *c, h2_config_var_t var)
static apr_int64_t h2_srv_config_geti64(const h2_config *conf, h2_config_var_t var)
int h2_config_sgeti(server_rec *s, h2_config_var_t var)
static const h2_config * h2_config_get(conn_rec *c)
@ H2_CONF_MAX_WORKER_IDLE_LIMIT
@ H2_CONF_MODERN_TLS_ONLY
@ H2_CONF_MAX_DATA_FRAME_LEN
@ H2_CONF_TLS_WARMUP_SIZE
@ H2_CONF_TLS_COOLDOWN_SECS
@ H2_CONF_PUSH_DIARY_SIZE
#define h2_conn_ctx_get(c)
static int threads_per_child
Structure to store things which are per connection.
apr_interval_time_t idle_limit
apr_array_header_t * push_list
struct apr_hash_t * priorities
apr_int64_t tls_warmup_size
apr_table_t * early_headers
apr_interval_time_t stream_timeout
apr_table_t * early_headers
apr_array_header_t * push_list
apr_interval_time_t stream_timeout
A structure that represents the current request.
struct ap_conf_vector_t * per_dir_config
A structure to store information for each virtual server.
typedef int(WSAAPI *apr_winapi_fpt_WSAPoll)(IN OUT LPWSAPOLLFD fdArray