I have a test module (a PerlResponseHandler) in which all this works fine (get_server_port, construct_server - thanks for that one!)
So, I am suspecting that Apache::XMLRPC::Lite is causing the problem.
At 5:51 PM -0700 10/2/03, Stas Bekman wrote:
Matisse Enzer wrote:Before I file a bug report, am I doing this right:
use Apache::RequestUtil; my $port = $r->get_server_port; # should be my port number
My problem is that get_server_port seems to return 870 regardless of the actual port (set with Listen in httpd.conf)
may be you are inside a vhost running on that port? Try the latest mod_perl cvs and run:
t/TEST -v api/uri
on machine it gets out:
api/uri....1..15 # Running under perl version 5.008 for linux [...] # testing : construct_server/get_server_name/get_server_port # expected: localhost.localdomain:8529 # received: localhost.localdomain:8529 ok 4 [...]
which corresponds to the code:
my $server = $r->construct_server; ok t_cmp($server, join(':', $r->get_server_name, $r->get_server_port), "construct_server/get_server_name/get_server_port");
so if you are after constructing hostname:port you may as well use $r->construct_server;
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- ------------------------------------------ Matisse Enzer Doodlelab Inc. 415-925-5294 ext. 212 (office) 415-225-6703 (mobile)