summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Covener <covener@apache.org>2011-05-19 02:17:37 +0000
committerEric Covener <covener@apache.org>2011-05-19 02:17:37 +0000
commita323572790a3d437ff2da982d34067b7650a94e2 (patch)
tree7dc79379a57cea8f346ddda58d637ce0e021e29d
parent6ca1d4ac0871d5f5f122f32db42b3ee6c0e8cf2d (diff)
downloadhttpd-a323572790a3d437ff2da982d34067b7650a94e2.tar.gz
restore ABI break in r1082630, changed signature of ap_unescape_url_keep2f().
Reviewed By: covener, wrowe, trawick http://mail-archives.apache.org/mod_mbox/httpd-dev/201105.mbox/%3C4DD4032F.1070400@p6m7g8.com%3E git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1124515 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--include/ap_mmn.h8
-rw-r--r--include/httpd.h12
-rw-r--r--server/request.c2
-rw-r--r--server/util.c7
4 files changed, 23 insertions, 6 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index 6d847c6b74..7fafaf345f 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -141,7 +141,11 @@
* 20051115.24 (2.2.15) Add forward member to proxy_conn_rec
* 20051115.25 (2.2.17) Add errstatuses member to proxy_balancer
* 20051115.26 (2.2.18) Add ap_cache_check_allowed()
- * 20051115.27 (2.2.18) Add core_dir_config.decode_encoded_slashes.
+ * 20051115.27 (2.2.18) BROKEN ABI fixed in 2.2.19:
+ ap_unescape_url_keep2f() signature change
+ Add core_dir_config.decode_encoded_slashes.
+ * 20051115.28 (2.2.19) Restore ap_unescape_url_keep2f(char *url) signature
+ altered in 2.2.18.
*/
#define MODULE_MAGIC_COOKIE 0x41503232UL /* "AP22" */
@@ -149,7 +153,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20051115
#endif
-#define MODULE_MAGIC_NUMBER_MINOR 27 /* 0...n */
+#define MODULE_MAGIC_NUMBER_MINOR 28 /* 0...n */
/**
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
diff --git a/include/httpd.h b/include/httpd.h
index c872a454f0..8117528061 100644
--- a/include/httpd.h
+++ b/include/httpd.h
@@ -1450,11 +1450,19 @@ AP_DECLARE(int) ap_is_url(const char *u);
AP_DECLARE(int) ap_unescape_url(char *url);
/**
- * Unescape a URL, but leaving %2f (slashes) escaped
+ * Unescape a URL, including encoded slashes.
* @param url The url to unescape
* @return 0 on success, non-zero otherwise
*/
-AP_DECLARE(int) ap_unescape_url_keep2f(char *url, int decode_slashes);
+AP_DECLARE(int) ap_unescape_url_keep2f(char *url);
+
+/**
+ * Unescape a URL, including encoded slashes.
+ * @param url The url to unescape
+ * @param decode_slashes Whether or not slashes should be decoded or not
+ * @return 0 on success, non-zero otherwise
+ */
+AP_DECLARE(int) ap_unescape_url_keep2f_ex(char *url, int decode_slashes);
/**
* Convert all double slashes to single slashes
diff --git a/server/request.c b/server/request.c
index f70bb94d4a..f076e63749 100644
--- a/server/request.c
+++ b/server/request.c
@@ -109,7 +109,7 @@ AP_DECLARE(int) ap_process_request_internal(request_rec *r)
core_dir_config *d;
d = ap_get_module_config(r->per_dir_config, &core_module);
if (d->allow_encoded_slashes) {
- access_status = ap_unescape_url_keep2f(r->parsed_uri.path, d->decode_encoded_slashes);
+ access_status = ap_unescape_url_keep2f_ex(r->parsed_uri.path, d->decode_encoded_slashes);
}
else {
access_status = ap_unescape_url(r->parsed_uri.path);
diff --git a/server/util.c b/server/util.c
index b5bd872fea..d0b90c6a53 100644
--- a/server/util.c
+++ b/server/util.c
@@ -1589,7 +1589,7 @@ AP_DECLARE(int) ap_unescape_url(char *url)
return OK;
}
-AP_DECLARE(int) ap_unescape_url_keep2f(char *url, int decode_2f)
+AP_DECLARE(int) ap_unescape_url_keep2f_ex(char *url, int decode_2f)
{
register int badesc, badpath;
char *x, *y;
@@ -1640,6 +1640,11 @@ AP_DECLARE(int) ap_unescape_url_keep2f(char *url, int decode_2f)
}
}
+AP_DECLARE(int) ap_unescape_url_keep2f(char *url)
+{
+ return ap_unescape_url_keep2f_ex(url, 1);
+}
+
AP_DECLARE(char *) ap_construct_server(apr_pool_t *p, const char *hostname,
apr_port_t port, const request_rec *r)
{