You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Thomas Morin <th...@ago.fr> on 2002/11/04 10:01:11 UTC
mod_jk patch to honor Apache UseCanonicalName
Hi,
Here is a short patch to mod_jk giving people the opportunity to make mod_jk
honor Apache "UseCanonicalName" option.
Eg.:
ServerName www.foo.org
UseCanonicalName on
JkOption HonorUseCanonicalName
In practice in the following configuration, whatever the Host header in the
HTTP request, request.getServerName() will return "www.foo.org".
The patch is against tomcat connectors 1.2, it patches mod_jk for Apache 1.3
and Apache 2.0, and is under the Apache Software Licence.
Part for apache 1.3 was suitably tested, but I didn't have an Apache 2.0 handy
to test that part. I guess the patch is simple enough not to have side
effects, so I'm quite confident. I'd be happy to have feedback on both parts
anyway.
Feel free to mail me any feeling/feedback you have about this proposition.
Cheers,
-Thomas
PS: I'm not on tomcat-dev so please Cc me any reply, thanks.
--
== Thomas Morin -- GSM: 06 83 20 64 87 -- Tel: 02 98 05 98 54
== PGP Id:8CEA233D Key FP:503BF6CFD3AE8719377B832A02FB94E08CEA233D
--
Re: mod_jk patch to honor Apache UseCanonicalName
Posted by Henri Gomez <hg...@apache.org>.
Thomas Morin wrote:
> Hi,
>
> Here is a short patch to mod_jk giving people the opportunity to make mod_jk
> honor Apache "UseCanonicalName" option.
>
> Eg.:
>
> ServerName www.foo.org
> UseCanonicalName on
> JkOption HonorUseCanonicalName
It's allready included in latest mod_jk (1.2.1-dev) in CVS ;)
...
/* get server name */
/* s->server_name = (char *)(r->hostname ? r->hostname :
r->server->server_hostname); */
/* XXX : à la jk2 */
s->server_name = ap_get_server_name(r);
/* get the real port (otherwise redirect failed) */
/* s->server_port = htons( r->connection->local_addr.sin_port ); */
/* XXX : à la jk2 */
s->server_port = ap_get_server_port(r);
...
Thanks...
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>