RSRC_CONF, "on to enable HTTP/2 protocol handling"),
AP_INIT_TAKE1("H2MaxSessionStreams", h2_conf_set_max_streams, NULL,
RSRC_CONF, "maximum number of open streams per session"),
- AP_INIT_TAKE1("H2InitialWindowSize", h2_conf_set_window_size, NULL,
- RSRC_CONF, "initial window size on client DATA"),
+ AP_INIT_TAKE1("H2WindowSize", h2_conf_set_window_size, NULL,
+ RSRC_CONF, "window size on client DATA"),
AP_INIT_TAKE1("H2MaxHeaderListSize", h2_conf_set_max_hl_size, NULL,
RSRC_CONF, "maximum acceptable size of request headers"),
AP_INIT_TAKE1("H2MinWorkers", h2_conf_set_min_workers, NULL,
}
return ap_pass_brigade(f->next, bb);
}
-
-void h2_from_h1_die(h2_from_h1 *from_h1, int status, request_rec *r)
-{
- r->status = status;
- from_h1->response = create_response(from_h1, r);
-}
struct h2_response *h2_from_h1_get_response(h2_from_h1 *from_h1);
-void h2_from_h1_die(h2_from_h1 *from_h1, int status, request_rec *r);
-
h2_from_h1_state_t h2_from_h1_get_state(h2_from_h1 *from_h1);
apr_status_t h2_response_output_filter(ap_filter_t *f, apr_bucket_brigade *bb);
mod_reqtimeout, NULL, APR_HOOK_LAST);
ap_hook_post_read_request(h2_h2_post_read_req, NULL, NULL, APR_HOOK_MIDDLE);
+ /* With "H2SerializeHeaders On", we install the filter in this hook
+ * that parses the response. This needs to happen before any other post
+ * read function terminates the request with an error. Otherwise we will
+ * never see the response.
+ */
+ ap_hook_post_read_request(h2_h2_post_read_req, NULL, NULL, APR_HOOK_REALLY_FIRST);
}
int h2_h2_remove_timeout(conn_rec* c)
ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
"adding h1_to_h2_resp output filter");
if (env->serialize_headers) {
+ ap_remove_output_filter_byhandle(r->output_filters, "H1_TO_H2_RESP");
ap_add_output_filter("H1_TO_H2_RESP", env, r, r->connection);
}
else {
/* replace the core http filter that formats response headers
* in HTTP/1 with our own that collects status and headers */
ap_remove_output_filter_byhandle(r->output_filters, "HTTP_HEADER");
+ ap_remove_output_filter_byhandle(r->output_filters, "H2_RESPONSE");
ap_add_output_filter("H2_RESPONSE", env, r, r->connection);
}
}
f, bb, output->env->io);
}
-void h2_task_output_die(h2_task_output *output, int status, request_rec *r)
-{
- h2_from_h1_die(output->from_h1, status, r);
-}
int h2_task_output_has_started(h2_task_output *output);
-void h2_task_output_die(h2_task_output *output, int status, request_rec *r);
-
#endif /* defined(__mod_h2__h2_task_output__) */