| 2562 | } |
| 2563 | |
| 2564 | AP_DECLARE(int) ap_is_allowed_protocol(conn_rec *c, request_rec *r, |
| 2565 | server_rec *s, const char *protocol) |
| 2566 | { |
| 2567 | core_server_config *conf; |
| 2568 | |
| 2569 | if (!s) { |
| 2570 | s = (r? r->server : c->base_server); |
| 2571 | } |
| 2572 | conf = ap_get_core_module_config(s->module_config); |
| 2573 | |
| 2574 | if (conf->protocols->nelts > 0) { |
| 2575 | return ap_array_str_contains(conf->protocols, protocol); |
| 2576 | } |
| 2577 | return !strcmp(AP_PROTOCOL_HTTP1, protocol); |
| 2578 | } |
| 2579 | |
| 2580 | |
| 2581 | AP_IMPLEMENT_HOOK_VOID(pre_read_request, |
no test coverage detected