57static module *mpm_module;
61#if AP_HAS_RESPONSE_BUCKETS
77 module *m = ap_loaded_modules[i];
79 if (!
strcmp(
"event.c",
m->name)) {
83 else if (!
strcmp(
"motorz.c",
m->name)) {
87 else if (!
strcmp(
"mpm_netware.c",
m->name)) {
91 else if (!
strcmp(
"prefork.c",
m->name)) {
101 else if (!
strcmp(
"simple_api.c",
m->name)) {
106 else if (!
strcmp(
"mpm_winnt.c",
m->name)) {
110 else if (!
strcmp(
"worker.c",
m->name)) {
122 return mpm_module? mpm_module->name :
"unknown";
150 "h2_c2(%s): destroy", c2->
log_id);
208 "h2_c2_in(%s-%d): read, mode=%d, block=%d, readbytes=%ld",
237 "h2_c2_in(%s-%d): get more data from mplx, block=%d, "
264 "h2_c2_in(%s-%d): read returned",
284 "c2 input recv raw", fctx->
bb);
299 "c2 input.bb", fctx->
bb);
305 "h2_c2_in(%s-%d): no data",
333 "h2_c2_in(%s-%d): getline: %s",
342 "h2_c2_in(%s-%d), unsupported READ mode %d",
350 "h2_c2_in(%s-%d): %ld data bytes",
374#if !AP_MODULE_MAGIC_AT_LEAST(20180720, 1)
375 f->c->data_in_output_filters = 0;
381#if AP_HAS_RESPONSE_BUCKETS
382 if (!
conn_ctx->has_final_response) {
391 if (
resp->status >= 200) {
405 "h2_c2(%s-%d): output leave",
426 ((push_list && push_list->
nelts > 0) ||
430 if (push_list && push_list->
nelts > 0) {
432 "%s, early announcing %d resources for push",
434 for (
i = 0;
i < push_list->
nelts; ++
i) {
438 push->uri_ref,
push->critical?
"; critical" :
""));
511#if AP_HAS_RESPONSE_BUCKETS
521 "h2_c2(%s-%d): adding request filters",
551 r->body_indeterminate = 1;
556 "h2_mplx(%s-%d): copy_files in output",
578 "h2_c2(%s-%d), adding filters",
615#if H2_USE_POLLFD_FROM_CONN
700 "h2_c2(%s-%d), adding filters",
711 "h2_c2(%s-%d): process connection",
714 c2->current_thread = thread;
718 "h2_c2(%s-%d): processing done",
745 "h2_c2(%s-%d): create request_rec failed, r=NULL",
751 "h2_c2(%s-%d): create request_rec failed, r->status=%d",
760 "h2_c2(%s-%d): created request_rec for %s",
771 "h2_mplx(%s-%d): copy_files in output",
781 "h2_c2(%s-%d): start process_request",
799 "h2_c2(%s-%d): process_request done",
817 "h2_c2: create for c1(%ld)", c1->
id);
837#if AP_MODULE_MAGIC_AT_LEAST(20180903, 1)
838 c2->filter_conn_ctx =
NULL;
841#if !AP_MODULE_MAGIC_AT_LEAST(20180720, 1)
868 "h2_c2(%s): created", c2->
log_id);
879 "h2_c2(%s-%d): adding request filters",
904 if (
ctx->stream_id) {
906 "h2_h2, processing request directly");
912 "secondary_conn(%ld): no h2 stream assing?",
c->id);
928#if H2_USE_POLLFD_FROM_CONN
Apache Multi-Processing Module library.
const char apr_size_t len
ap_conf_vector_t * ap_create_conn_config(apr_pool_t *p)
int ap_run_pre_connection(conn_rec *c, void *csd)
int ap_run_process_connection(conn_rec *c)
void ap_hook_process_connection(ap_HOOK_process_connection_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_pre_connection(ap_HOOK_pre_connection_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define ap_get_module_config(v, m)
#define ap_set_module_config(v, m, val)
ap_filter_t * ap_add_input_filter(const char *name, void *ctx, request_rec *r, conn_rec *c)
apr_status_t ap_remove_output_filter_byhandle(ap_filter_t *next, const char *handle)
ap_filter_t * ap_add_input_filter_handle(ap_filter_rec_t *f, void *ctx, request_rec *r, conn_rec *c)
ap_filter_rec_t * ap_register_output_filter(const char *name, ap_out_filter_func filter_func, ap_init_filter_func filter_init, ap_filter_type ftype)
ap_filter_t * ap_add_output_filter(const char *name, void *ctx, request_rec *r, conn_rec *c)
apr_status_t ap_filter_rec_t * ap_register_input_filter(const char *name, ap_in_filter_func filter_func, ap_init_filter_func filter_init, ap_filter_type ftype)
ap_filter_t * ap_add_output_filter_handle(ap_filter_rec_t *f, void *ctx, request_rec *r, conn_rec *c)
apr_status_t ap_get_brigade(ap_filter_t *filter, apr_bucket_brigade *bucket, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes)
apr_socket_t * ap_get_conn_socket(conn_rec *c)
void ap_hook_get_pollfd_from_conn(ap_HOOK_get_pollfd_from_conn_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_send_interim_response(request_rec *r, int send_headers)
void ap_hook_pre_read_request(ap_HOOK_pre_read_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_hook_post_read_request(ap_HOOK_post_read_request_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
void ap_process_request(request_rec *r)
int ap_is_initial_req(request_rec *r)
void ap_hook_fixups(ap_HOOK_fixups_t *pf, const char *const *aszPre, const char *const *aszSucc, int nOrder)
#define APR_STATUS_IS_EAGAIN(s)
#define APR_STATUS_IS_EOF(s)
#define APR_BRIGADE_INSERT_TAIL(b, e)
#define APR_BUCKET_NEXT(e)
#define APR_BRIGADE_CONCAT(a, b)
#define APR_BRIGADE_EMPTY(b)
#define APR_BRIGADE_SENTINEL(b)
#define APR_BUCKET_IS_EOS(e)
apr_brigade_flush void * ctx
#define APR_BRIGADE_FIRST(b)
apr_dbd_transaction_t int mode
#define APR_HOOK_REALLY_FIRST
#define APR_REGISTER_OPTIONAL_FN(name)
const char const char int ap_is_chunked(apr_pool_t *p, const char *line)
#define AP_DEBUG_ASSERT(exp)
@ CONN_STATE_WRITE_COMPLETION
const char int apr_pool_t * pool
void const char apr_status_t(* cleanup)(void *))
apr_vformatter_buff_t * c
#define apr_pool_create(newpool, parent)
#define apr_pcalloc(p, size)
#define APR_ARRAY_IDX(ary, i, type)
apr_int64_t apr_interval_time_t
#define H2_PUSH_MODE_NOTE
void h2_beam_abort(h2_bucket_beam *beam, conn_rec *c)
apr_interval_time_t h2_beam_timeout_get(h2_bucket_beam *beam)
void h2_beam_close(h2_bucket_beam *beam, conn_rec *c)
apr_status_t h2_beam_send(h2_bucket_beam *beam, conn_rec *from, apr_bucket_brigade *sender_bb, apr_read_type_e block, apr_off_t *pwritten)
void h2_beam_set_copy_files(h2_bucket_beam *beam, int enabled)
apr_status_t h2_beam_receive(h2_bucket_beam *beam, conn_rec *to, apr_bucket_brigade *bb, apr_read_type_e block, apr_off_t readbytes)
apr_OFN_ap_logio_add_bytes_in_t * h2_c_logio_add_bytes_in
apr_OFN_ap_logio_add_bytes_out_t * h2_c_logio_add_bytes_out
static int c2_hook_fixups(request_rec *r)
static apr_socket_t * dummy_socket
static void check_early_hints(request_rec *r, const char *tag)
void h2_c2_abort(conn_rec *c2, conn_rec *from)
static int h2_c2_hook_process(conn_rec *c)
conn_rec * h2_c2_create(conn_rec *c1, apr_pool_t *parent, apr_bucket_alloc_t *buckt_alloc)
static apr_status_t beam_out(conn_rec *c2, h2_conn_ctx_t *conn_ctx, apr_bucket_brigade *bb)
void h2_c2_register_hooks(void)
void h2_c2_destroy(conn_rec *c2)
int h2_mpm_supported(void)
static int addn_headers(void *udata, const char *name, const char *value)
static apr_status_t http2_get_pollfd_from_conn(conn_rec *c, struct apr_pollfd_t *pfd, apr_interval_time_t *ptimeout)
apr_status_t h2_c2_child_init(apr_pool_t *pool, server_rec *s)
static apr_status_t h2_c2_filter_in(ap_filter_t *f, apr_bucket_brigade *bb, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes)
static int h2_c2_hook_post_read_request(request_rec *r)
apr_status_t h2_c2_process(conn_rec *c2, apr_thread_t *thread, int worker_id)
const char * h2_conn_mpm_name(void)
static void check_modules(int force)
static apr_status_t c2_run_pre_connection(conn_rec *c2, apr_socket_t *csd)
static void h2_c2_log_io(conn_rec *c2, apr_off_t bytes_sent)
static apr_status_t h2_c2_filter_out(ap_filter_t *f, apr_bucket_brigade *bb)
static apr_status_t c2_process(h2_conn_ctx_t *conn_ctx, conn_rec *c)
apr_status_t h2_c2_filter_response_out(ap_filter_t *f, apr_bucket_brigade *bb)
apr_status_t h2_c2_filter_trailers_out(ap_filter_t *f, apr_bucket_brigade *bb)
apr_status_t h2_c2_filter_request_in(ap_filter_t *f, apr_bucket_brigade *bb, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes)
apr_status_t h2_c2_filter_catch_h1_out(ap_filter_t *f, apr_bucket_brigade *bb)
apr_array_header_t * h2_config_push_list(request_rec *r)
int h2_config_rgeti(request_rec *r, h2_config_var_t var)
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)
int h2_config_sgeti(server_rec *s, h2_config_var_t var)
void h2_conn_ctx_set_timeout(h2_conn_ctx_t *conn_ctx, apr_interval_time_t timeout)
#define h2_conn_ctx_get(c)
request_rec * h2_create_request_rec(const h2_request *req, conn_rec *c, int no_body)
apr_status_t h2_util_wait_on_pipe(apr_file_t *pipe)
apr_status_t h2_brigade_copy_length(apr_bucket_brigade *dest, apr_bucket_brigade *src, apr_off_t length)
apr_status_t h2_brigade_concat_length(apr_bucket_brigade *dest, apr_bucket_brigade *src, apr_off_t length)
#define h2_util_bb_log(c, sid, level, tag, bb)
const h2_request * h2_ws_rewrite_request(const h2_request *req, conn_rec *c2, int no_body)
Apache connection library.
mod_core private header file
Multi-Processing Modules functions.
Apache scoreboard library.
#define SERVER_BUSY_WRITE
int ap_update_child_status(ap_sb_handle_t *sbh, int status, request_rec *r)
This structure is used for recording information about the registered filters. It associates a name w...
The representation of a filter chain.
Structure to store things which are per connection.
unsigned int clogging_input_filters
const struct ap_logconf * log
int data_in_output_filters
ap_conn_keepalive_e keepalive
struct ap_filter_t * input_filters
struct ap_filter_t * output_filters
struct apr_bucket_alloc_t * bucket_alloc
struct ap_conf_vector_t * conn_config
int data_in_input_filters
A structure to contain connection state information.
A structure that represents the current request.
struct ap_filter_t * output_filters
apr_table_t * headers_out
A structure to store information for each virtual server.
apr_interval_time_t timeout
apr_status_t apr_socket_create(apr_socket_t **new, int ofamily, int type, int protocol, apr_pool_t *cont)
ap_input_mode_t
input filtering modes