| 115 | |
| 116 | |
| 117 | static int allowed_port(connect_conf *conf, int port) |
| 118 | { |
| 119 | int i; |
| 120 | port_range *list = (port_range *) conf->allowed_connect_ports->elts; |
| 121 | |
| 122 | if (apr_is_empty_array(conf->allowed_connect_ports)) { |
| 123 | return port == APR_URI_HTTPS_DEFAULT_PORT |
| 124 | || port == APR_URI_SNEWS_DEFAULT_PORT; |
| 125 | } |
| 126 | |
| 127 | for (i = 0; i < conf->allowed_connect_ports->nelts; i++) { |
| 128 | if (port >= list[i].first && port <= list[i].last) |
| 129 | return 1; |
| 130 | } |
| 131 | return 0; |
| 132 | } |
| 133 | |
| 134 | /* canonicalise CONNECT URLs. */ |
| 135 | static int proxy_connect_canon(request_rec *r, char *url) |
no outgoing calls
no test coverage detected