summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStefan Fritsch <sf@apache.org>2010-01-16 21:32:09 +0100
committerStefan Fritsch <sf@apache.org>2010-01-16 21:32:09 +0100
commit3560f2e01526672460eb4107c049dfd17dc18f95 (patch)
treed996a0f13ba9a8d6df7a2deb54c79a8b099f2f9d /include
parentFix typos (diff)
downloadapache2-3560f2e01526672460eb4107c049dfd17dc18f95.tar.xz
apache2-3560f2e01526672460eb4107c049dfd17dc18f95.zip
Turn static function get_server_name_for_url() into public function
ap_get_server_name_for_url() and use it where appropriate. This fixes mod_rewrite generating invalid URLs for redirects to IPv6 literal addresses. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@900022 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include')
-rw-r--r--include/ap_mmn.h3
-rw-r--r--include/http_core.h9
2 files changed, 11 insertions, 1 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index ceb8f0b98c..47c0bb6bfc 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -211,6 +211,7 @@
* 20091230.0 (2.3.5-dev) Move ftp_directory_charset from proxy_dir_conf
* to proxy_ftp_dir_conf(mod_proxy_ftp)
* 20091230.1 (2.3.5-dev) add util_ldap_state_t.opTimeout
+ * 20091230.2 (2.3.5-dev) add ap_get_server_name_for_url()
*
*/
@@ -219,7 +220,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20091230
#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_core.h b/include/http_core.h
index 2583493609..f6d81a4069 100644
--- a/include/http_core.h
+++ b/include/http_core.h
@@ -211,6 +211,15 @@ AP_DECLARE(char *) ap_construct_url(apr_pool_t *p, const char *uri, request_rec
AP_DECLARE(const char *) ap_get_server_name(request_rec *r);
/**
+ * Get the current server name from the request for the purposes
+ * of using in a URL. If the server name is an IPv6 literal
+ * address, it will be returned in URL format (e.g., "[fe80::1]").
+ * @param r The current request
+ * @return the server name
+ */
+AP_DECLARE(const char *) ap_get_server_name_for_url(request_rec *r);
+
+/**
* Get the current server port
* @param r The current request
* @return The server's port