Sander Temme wrote:
On Nov 11, 2005, at 12:33 PM, Brian Akins wrote:
in 2.1.9 ap_get_server_port uses the following:
port = r->parsed_uri.port_str ? r->parsed_uri.port :
r->connection->local_addr->port ? r->connection-
>local_addr->port :
r->server->port ? r->server->port :
ap_default_port(r);
in 2.0.55 it uses:
port = r->parsed_uri.port_str ? r->parsed_uri.port :
r->server->port ? r->server->port :
ap_default_port(r);
This just bit me bad! I was used to being able to declare things like:
What bit you is probably the change in default value for
UseCanonicalName? Used to be On by default, now it's Off. Try flicking
that switch.
ServerName www.domain.com:80
and having redirects (mod_dir, etc) to pick up on this via
ap_construct_url
What, if any, is the work around for 2.1.9? I really don't want to
use "UseCanonicalName On"
Did you force it to 'Off' in 2.0?
Yes.
If you have it 'Off', you believe
what the client sends you, or what you explicitly stashed in the server
record by specifying it in the ServerName directive.
I would "stash" it in Servername.
===================================================================
--- server/core.c (revision 332799)
+++ server/core.c (working copy)
@@ -960,8 +960,8 @@
* any are supplied (otherwise it will use the canonical name).
*/
port = r->parsed_uri.port_str ? r->parsed_uri.port :
+ r->server->port ? r->server->port :
r->connection->local_addr->port ? r->connection-
>local_addr->port :
- r->server->port ? r->server->port :
ap_default_port(r);
}
else { /* d->use_canonical_name == USE_CANONICAL_NAME_ON */
I think that would work for me. If clients. set bogus ports, they get
what they deserve.
+1 if that matters.
Any possibility of this being in 2.1.10 (or 2.2-rc1/2 whatever we are
calling next "pre-release.")
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies