diff options
author | Stefan Fritsch <sf@apache.org> | 2010-01-16 21:32:09 +0100 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2010-01-16 21:32:09 +0100 |
commit | 3560f2e01526672460eb4107c049dfd17dc18f95 (patch) | |
tree | d996a0f13ba9a8d6df7a2deb54c79a8b099f2f9d /include/http_core.h | |
parent | Fix typos (diff) | |
download | apache2-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/http_core.h')
-rw-r--r-- | include/http_core.h | 9 |
1 files changed, 9 insertions, 0 deletions
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 |