]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Change ap_construct_url() so that the r->hostname is used in
authorGraham Leggett <minfrin@apache.org>
Thu, 21 Mar 2002 14:37:42 +0000 (14:37 +0000)
committerGraham Leggett <minfrin@apache.org>
Thu, 21 Mar 2002 14:37:42 +0000 (14:37 +0000)
the URL instead of the value of the ServerName directive. This
stops Apache redirecting to a different website name to the
one the user typed in, which can break cookies and javascript
handling on the client.
PR:
Obtained from:
Submitted by:
Reviewed by:

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@94084 13f79535-47bb-0310-9956-ffa450edef68

src/CHANGES
src/main/http_core.c

index 07065beb8b6f216d631e47fc72b739ec3a660f44..0b3e233d2d485aefaca3a58d6734d4b43c046e78 100644 (file)
@@ -1,5 +1,11 @@
 Changes with Apache 1.3.24
 
+  *) Change ap_construct_url() so that the r->hostname is used in
+     the URL instead of the value of the ServerName directive. This
+     stops Apache redirecting to a different website name to the
+     one the user typed in, which can break cookies and javascript
+     handling on the client. [Graham Leggett]
+
   *) Fixed the previous multiple-cookie fix in the proxy. Cookies
      are broken in that they contain dates which in turn contain
      commas - so merging and then unmerging them breaks Set-Cookie
index d37b04bd83bae03e4e9f870174b640fa5962d643..bb7407c30dd2256aa7f40a9e9848f129c9564823 100644 (file)
@@ -831,7 +831,7 @@ API_EXPORT(char *) ap_construct_url(pool *p, const char *uri,
                                    request_rec *r)
 {
     unsigned port = ap_get_server_port(r);
-    const char *host = ap_get_server_name(r);
+    const char *host = r->hostname;
 
     if (ap_is_default_port(port, r)) {
        return ap_pstrcat(p, ap_http_method(r), "://", host, uri, NULL);