summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2020-06-22 10:32:15 +0000
committerYann Ylavic <ylavic@apache.org>2020-06-22 10:32:15 +0000
commitd2c7a48ff6dadfc582e07c3c46920f44e3bcbb78 (patch)
treece8caa2725d4c2964208df5373e788ed8e5505b0 /include
parent4004ce236575d8b0a8c0d001352742055a8c76c3 (diff)
downloadhttpd-d2c7a48ff6dadfc582e07c3c46920f44e3bcbb78.tar.gz
Add pre_translate_name hook running before URI-path decoding.
This allows any module to work with un-decoded URI-path (besides unreserved characters) in r->uri, and eventually to avoid decoding by returning OK. The first candidate is mod_proxy (following commit) when ProxyMappingDecoded is disabled, such that the forwarded URI is equivalent to the original one. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1879076 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/ap_mmn.h3
-rw-r--r--include/http_request.h10
2 files changed, 12 insertions, 1 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index 15d2641d1a..a3ab84498f 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -633,6 +633,7 @@
* 20200420.2 (2.5.1-dev) Add ap_proxy_worker_can_upgrade()
* 20200420.3 (2.5.1-dev) Add ap_parse_strict_length()
* 20200420.4 (2.5.1-dev) Add ap_normalize_path()
+ * 20200420.5 (2.5.1-dev) Add pre_translate_name hook
*/
#define MODULE_MAGIC_COOKIE 0x41503235UL /* "AP25" */
@@ -640,7 +641,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20200420
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 4 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 5 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
diff --git a/include/http_request.h b/include/http_request.h
index aedafed89e..323a0cfcd5 100644
--- a/include/http_request.h
+++ b/include/http_request.h
@@ -364,6 +364,16 @@ AP_DECLARE_HOOK(int,create_request,(request_rec *r))
/**
* This hook allow modules an opportunity to translate the URI into an
+ * actual filename, before URL decoding happens.
+ * rules will be followed.
+ * @param r The current request
+ * @return OK, DECLINED, or HTTP_...
+ * @ingroup hooks
+ */
+AP_DECLARE_HOOK(int,pre_translate_name,(request_rec *r))
+
+/**
+ * This hook allow modules an opportunity to translate the URI into an
* actual filename. If no modules do anything special, the server's default
* rules will be followed.
* @param r The current request