You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Christian Kruse <CK...@wwwtech.de> on 2002/10/22 16:46:25 UTC

Port of the actual request

Hello together,

I've got a little question: is it possible to get the port from which
the actual request came? I'm asking for Apache 1.3.x and Apache 2.x.
Answers would be nice...

Greetings,
 CK


Re: Port of the actual request

Posted by Christian Kruse <CK...@wwwtech.de>.
Hello,

On Tue, Oct 22, 2002 at 09:39:56PM +0200, André Malo wrote:
> If you wanna take care of the UseCanonicalName setting, you just may use
> ap_get_server_port. If you want to get a more specific results, simply
> look into that function.

Thank you, this is exactly what I looked for.

Greetings,
 CK

-- 
http://libtemplate.sourceforge.net/
http://sourceforge.net/projects/mod-gzip/


Re: Port of the actual request

Posted by André Malo <nd...@perlig.de>.
* Christian Kruse wrote:

> I've got a little question: is it possible to get the port from which
> the actual request came? I'm asking for Apache 1.3.x and Apache 2.x.
> Answers would be nice...

If you wanna take care of the UseCanonicalName setting, you just may use
ap_get_server_port. If you want to get a more specific results, simply
look into that function.

ap_get_server_port is defined in src/main/http_core.c (1.3) and
server/core.c (2.0) 

HTH, nd
-- 
package Hacker::Perl::Another::Just;print
qq~@{[reverse split/::/ =>__PACKAGE__]}~;

#  André Malo  #  http://www.perlig.de  #