httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Estrade Matthieu <estrad...@ifrance.com>
Subject r->server->port problem
Date Mon, 25 Nov 2002 16:29:33 GMT
Hi,

I posted a mail about a problem with r->server->port few days ago,
I did a patch to correct this bug, but i am not sure it's a bug...

the problem was when UseCannonicalName is Off,

If i have a request on port 8095 like:

GET / HTTP/1.1
Host: mydomain.com
\n\n\r

my module is using the r->server->port

the r->server->port will be ap_default_port  because of in server/core.c:

(When UseCanonicalName Off)

port = r->parsed_uri.port ? r->parsed_uri.port :
                r->server->port ? r->server->port :
                ap_default_port(r);

so, i did:

port = r->parsed_uri.port ? r->parsed_uri.port :
               r->server->port ? r->server->port :
               r->connection->local_addr->port ? 
r->connection->local_addr->port :
               ap_default_port(r);

I dunno if i am true or false.

it's now working in my module, it's finding r->server->port = 8095 
instead of 80


regards,

Estrade Matthieu



Mime
View raw message