httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject server->port busted
Date Thu, 06 Dec 2001 00:01:13 GMT
The Port directive used to set the server->port variable. When Port was
tossed, we also lost the use of server->port. That affects the response of
ap_get_server_port() and ap_matches_request_vhost().

[ exercise for the reader to look into those ]


The basic problem is now that the server doesn't know its own port when it
needs to create a redirect or some kind of response. The ports are all in
the Listen records, which aren't readily available. And we don't get a full
mapping of the Listen stuff into the server_rec data.

The problems in ap_get_server_port() may be relaxed if we didn't enable
UseCanonicalName by default, but we do...


Example case: tell Apache that it is listening on port 8080. That port
number does not appear anywhere (not in a server_rec or a server_addr_rec).
When a client makes a request, if they say "Host: localhost:8080", then the
8080 will appear in r->parse_uri.port. Of course, they could also lie on
that port and the server wouldn't know any better.

I'm not exactly sure what the right answer to this is. Kind of a fundamental
problem with Apache not able to get a port number for "this server".

Ideas? Thoughts?

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Mime
View raw message