[prev in list] [next in list] [prev in thread] [next in thread]
List: apache-modperl
Subject: Re: How to get the port used by the request
From: Torsten =?iso-8859-1?q?F=F6rtsch?= <torsten.foertsch () gmx ! net>
Date: 2010-09-01 11:28:11
Message-ID: 201009011328.11353.torsten.foertsch () gmx ! net
[Download RAW message or body]
On Wednesday, September 01, 2010 12:07:43 Cédric Bertolini wrote:
> When a request is handled by mod_perl, I'd like to know what port was used
> to request the server. But $r->server->port always returns 0. I have tested
> $r->main and $r->prev, but the problem doesn't come from here. And I didn't
> find any other way to get the port. Even $r->uri and such don't return the
> port, even though $r->hostname returns the server hostname. Where is my
> mistake?
$r->connection->local_addr->port;
$r->connection->remote_addr->port;
Torsten Förtsch
--
Need professional modperl support? Hire me! (http://foertsch.name)
Like fantasy? http://kabatinte.net
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic