| 215 | } |
| 216 | |
| 217 | int 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 | |
| 232 | int h2_c1_can_upgrade(request_rec *r) |
| 233 | { |
no test coverage detected