httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Querna <c...@force-elite.com>
Subject Re: ap_get_server_port differences
Date Sun, 13 Nov 2005 00:14:35 GMT
Sander Temme wrote:
......
> Did you force it to 'Off' in 2.0? 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. In the newer
> server, we added the actual port the request came in on, which should
> match the information in the server_rec...
> 
> In the other case, UseCanonicalName On which was default in the 2.0
> branch, we look first in the server_rec and then in the connection. You
> could possibly make a case for having the search order in the top of the
> if clause match the one in the bottom. This against trunk:
> 
> ===================================================================
> --- 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 */
> 
> That would probably better align with the principle of least astonishment.
> 

+1 to the above.

-Paul


Mime
View raw message