> -----Mensaje original----- > De: Bojan Smojver [mailto:[EMAIL PROTECTED]] > Enviado el: 29 de agosto de 2002 1:46 > Para: Tomcat Dev List > Asunto: Re: Spec question: RE BUG 12052 > >
> > ---------------- > AP_DECLARE(apr_port_t) ap_get_server_port(const request_rec *r) > { > apr_port_t port; > core_dir_config *d = > (core_dir_config *)ap_get_module_config(r->per_dir_config, > &core_module); > > if (d->use_canonical_name == USE_CANONICAL_NAME_OFF > || d->use_canonical_name == USE_CANONICAL_NAME_DNS) { > > /* With UseCanonicalName off Apache will form self-referential > * URLs using the hostname and port supplied by the client if > * any are supplied (otherwise it will use the > canonical name). > */ > port = r->parsed_uri.port ? r->parsed_uri.port : > r->server->port ? r->server->port : > ap_default_port(r); >From the comment it seems to say, that Apache will get the port form client supplied infos, and in the rfc2616(5.2) says that if the request uri is relative ( i think actual clients only produce relative uris ) the host+port SHOULD be readed from the Host header.. So, i dont see any contradiction here, Apache2 does the rights thing too.. at least with the port, for sure the servername will be the same.. > > This doesn't seem like coming from headers, but rather from URL or as > indicated by the server itself. What do you think? > We know how r->parsed_uri.port gets his value? but for sure Apache is following the HTTP rfc 5.2.. reading it from Host header if needed (raletive uris), if not it's a bug in Apache2 ( 2 days to be sufficiently daring to say that :) All of that if you USE_CANONICAL_NAME_OFF, but is the default, i think. Saludos , Ignacio J. Ortega -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>