| 1606 | } |
| 1607 | |
| 1608 | AP_DECLARE(int) ap_post_read_request(request_rec *r) |
| 1609 | { |
| 1610 | int status; |
| 1611 | |
| 1612 | if ((status = ap_run_post_read_request(r))) { |
| 1613 | return status; |
| 1614 | } |
| 1615 | |
| 1616 | /* Enforce http(s) only scheme for non-forward-proxy requests */ |
| 1617 | if (!r->proxyreq |
| 1618 | && r->parsed_uri.scheme |
| 1619 | && (ap_cstr_casecmpn(r->parsed_uri.scheme, "http", 4) != 0 |
| 1620 | || (r->parsed_uri.scheme[4] != '\0' |
| 1621 | && (apr_tolower(r->parsed_uri.scheme[4]) != 's' |
| 1622 | || r->parsed_uri.scheme[5] != '\0')))) { |
| 1623 | return HTTP_BAD_REQUEST; |
| 1624 | } |
| 1625 | |
| 1626 | return OK; |
| 1627 | } |
| 1628 | |
| 1629 | /* if a request with a body creates a subrequest, remove original request's |
| 1630 | * input headers which pertain to the body which has already been read. |
no test coverage detected