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

Function h2_c1_allows_direct

modules/http2/h2_c1.c:217–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

215}
216
217int h2_c1_allows_direct(conn_rec *c)
218{
219 if (!c->master) {
220 int is_tls = ap_ssl_conn_is_ssl(c);
221 const char *needed_protocol = is_tls? "h2" : "h2c";
222 int h2_direct = h2_config_cgeti(c, H2_CONF_DIRECT);
223
224 if (h2_direct < 0) {
225 h2_direct = is_tls? 0 : 1;
226 }
227 return (h2_direct && ap_is_allowed_protocol(c, NULL, NULL, needed_protocol));
228 }
229 return 0;
230}
231
232int h2_c1_can_upgrade(request_rec *r)
233{

Callers 1

Calls 3

ap_ssl_conn_is_sslFunction · 0.85
h2_config_cgetiFunction · 0.85
ap_is_allowed_protocolFunction · 0.85

Tested by

no test coverage detected