How to get the port used by the request

Cédric Bertolini <[email protected]>
Newsgroups gmane.comp.apache.mod-perl
Message-ID <[email protected]>
Hello,

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?

Thanks for your time.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.