diff options
author | Yann Ylavic <ylavic@apache.org> | 2021-12-13 18:55:18 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2021-12-13 18:55:18 +0000 |
commit | 3ec0ffb9e1ac05622b97a7afd6992dd2bd41ce38 (patch) | |
tree | 507e70b7677f204290b5a8c176159ede06ba7a63 /include | |
parent | 5c49a85c126d23f89fe02531d12da74ce33a0d92 (diff) | |
download | httpd-3ec0ffb9e1ac05622b97a7afd6992dd2bd41ce38.tar.gz |
http: Enforce that fully qualified uri-paths not to be forward-proxied
have an http(s) scheme, and that the ones to be forward proxied have a
hostname, per HTTP specifications.
The early checks avoid failing the request later on and thus save cycles
for those invalid cases.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1895921 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r-- | include/ap_mmn.h | 3 | ||||
-rw-r--r-- | include/http_protocol.h | 7 |
2 files changed, 9 insertions, 1 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h index 822a41eaf5..67f3637448 100644 --- a/include/ap_mmn.h +++ b/include/ap_mmn.h @@ -695,6 +695,7 @@ * 20210926.0 (2.5.1-dev) Add dav_get_liveprop_element(), remove DAV_PROP_ELEMENT. * 20210926.1 (2.5.1-dev) Add ap_unescape_url_ex() and deprecate * AP_NORMALIZE_DROP_PARAMETERS + * 20210926.2 (2.5.1-dev) Add ap_post_read_request() * */ @@ -703,7 +704,7 @@ #ifndef MODULE_MAGIC_NUMBER_MAJOR #define MODULE_MAGIC_NUMBER_MAJOR 20210926 #endif -#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */ +#define MODULE_MAGIC_NUMBER_MINOR 2 /* 0...n */ /** * Determine if the server's current MODULE_MAGIC_NUMBER is at least a diff --git a/include/http_protocol.h b/include/http_protocol.h index 9c9cb952b2..38eef396a3 100644 --- a/include/http_protocol.h +++ b/include/http_protocol.h @@ -96,6 +96,13 @@ AP_DECLARE(void) ap_get_mime_headers(request_rec *r); AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb); +/** + * Run post_read_request hook and validate. + * @param r The current request + * @return OK or HTTP_... + */ +AP_DECLARE(int) ap_post_read_request(request_rec *r); + /* Finish up stuff after a request */ /** |