MCPcopy Create free account
hub / github.com/apache/httpd / h2_c1_setup

Function h2_c1_setup

modules/http2/h2_c1.c:92–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

90
91
92apr_status_t h2_c1_setup(conn_rec *c, request_rec *r, server_rec *s)
93{
94 h2_session *session;
95 h2_conn_ctx_t *ctx;
96 apr_status_t rv;
97
98 if (!workers) {
99 ap_log_cerror(APLOG_MARK, APLOG_ERR, 0, c, APLOGNO(02911)
100 "workers not initialized");
101 rv = APR_EGENERAL;
102 goto cleanup;
103 }
104
105 rv = h2_session_create(&session, c, r, s, workers);
106 if (APR_SUCCESS != rv) goto cleanup;
107
108 ctx = h2_conn_ctx_get(c);
109 ap_assert(ctx);
110 h2_conn_ctx_assign_session(ctx, session);
111 /* remove the input filter of mod_reqtimeout, now that the connection
112 * is established and we have switched to h2. reqtimeout has supervised
113 * possibly configured handshake timeouts and needs to get out of the way
114 * now since the rest of its state handling assumes http/1.x to take place. */
115 ap_remove_input_filter_byhandle(c->input_filters, "reqtimeout");
116
117cleanup:
118 return rv;
119}
120
121int h2_c1_run(conn_rec *c)
122{

Callers 2

h2_protocol_switchFunction · 0.85

Calls 3

h2_session_createFunction · 0.85

Tested by

no test coverage detected