You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Nathan Neulinger <nn...@umr.edu> on 1997/11/20 03:53:58 UTC

odd behavior of Listen, Port, SERVER_PORT, and redirects

I am not sure if this is the expected behavior, but I just put in a 1.3b2 
server, with no "Port" directive, and two Listen directives, port 2700 on 
two different addresses. (I believe the behavior has been in all the 
versions. I had encountered the second error before, and forgot about it 
till now.)

When I issue a query against it to:

	http://blah:2700/dir

it redirects to

	http://blah/dir/

Seems to me that it should use whatever port the request came in on.

-----------

On a related note, if I issue a request to:

	http://server:2700/cgi-bin/anything

SERVER_PORT is set to 80.

This seems to me to be the same problem as above. 

------------

It is possible that the Port directive is required, but this is a tad 
counterintuitive, particularly if you have two listens on different ports.

-- Nathan

------------------------------------------------------------
Nathan Neulinger                       EMail:  nneul@umr.edu
University of Missouri - Rolla         Phone: (573) 341-4841
Computing Services                       Fax: (573) 341-4216

Re: odd behavior of Listen, Port, SERVER_PORT, and redirects

Posted by Dean Gaudet <dg...@arctic.org>.

On Wed, 19 Nov 1997, Nathan Neulinger wrote:

> I am not sure if this is the expected behavior, but I just put in a 1.3b2 
> server, with no "Port" directive, and two Listen directives, port 2700 on 
> two different addresses. (I believe the behavior has been in all the 
> versions. I had encountered the second error before, and forgot about it 
> till now.)
> 
> When I issue a query against it to:
> 
> 	http://blah:2700/dir
> 
> it redirects to
> 
> 	http://blah/dir/

Expected... Port in the main server has two meanings, one of them is to
decide what port the server "lives" on... as opposed to answers to.

> Seems to me that it should use whatever port the request came in on.

Yeah a lot of folks think this way ...

> -----------
> 
> On a related note, if I issue a request to:
> 
> 	http://server:2700/cgi-bin/anything
> 
> SERVER_PORT is set to 80.
> 
> This seems to me to be the same problem as above. 

Yup.

> ------------
> 
> It is possible that the Port directive is required, but this is a tad 
> counterintuitive, particularly if you have two listens on different ports.

Apache doesn't support a vhost which has multiple canonical names ... 
there's no reason I can think of that it can't support these, it just
doesn't. 

Dean