Certainly, isn't this better addressed by UseCanonicalName? We
depend on ap_get_server_name() to do the "right thing" depending
on that setting... This doesn't seem right to me.
[EMAIL PROTECTED] wrote:
>
> minfrin 02/03/21 06:37:43
>
> Modified: src CHANGES
> src/main http_core.c
> Log:
> 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.
>
> Revision Changes Path
> 1.1790 +6 -0 apache-1.3/src/CHANGES
>
> Index: CHANGES
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/CHANGES,v
> retrieving revision 1.1789
> retrieving revision 1.1790
> diff -u -r1.1789 -r1.1790
> --- CHANGES 21 Mar 2002 11:38:03 -0000 1.1789
> +++ CHANGES 21 Mar 2002 14:37:42 -0000 1.1790
> @@ -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
>
>
>
> 1.310 +1 -1 apache-1.3/src/main/http_core.c
>
> Index: http_core.c
> ===================================================================
> RCS file: /home/cvs/apache-1.3/src/main/http_core.c,v
> retrieving revision 1.309
> retrieving revision 1.310
> diff -u -r1.309 -r1.310
> --- http_core.c 21 Mar 2002 06:04:27 -0000 1.309
> +++ http_core.c 21 Mar 2002 14:37:42 -0000 1.310
> @@ -831,7 +831,7 @@
> 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);
>
>
>
>
--
===========================================================================
Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/
"A society that will trade a little liberty for a little order
will lose both and deserve neither" - T.Jefferson