Re: mod_perl 2: $r->get_server_port returns wrong value

2003-10-08 Thread Matisse Enzer
At 8:14 PM -0400 10/8/03, Geoffrey Young wrote: This doesn't make sense to me, because I had believed that get_server_port gets its information from the server side only, but perhaps i am mistaken about that. yes, you are. if UseCanonicalName is set to Off or DNS, first the incoming URI is chec

Re: mod_perl 2: $r->get_server_port returns wrong value

2003-10-08 Thread Geoffrey Young
Matisse Enzer wrote: Is it possible that the value returned by $r->get_server_port could be affected by the format or content of the client request? yes I've got a test case where when i hit the same URL from two different clients I get different values from $r->get_server_port. This doesn't

Re: mod_perl 2: $r->get_server_port returns wrong value

2003-10-08 Thread Matisse Enzer
Title: Re: mod_perl 2: $r->get_server_port returns wrong valu More on my own question: It *seems* that get_server_port gives the wrong answer when responding to an HTTP/1.0 request. That is, it always says port '80' for HTTP/1.0 Should I report this as a bug? (Apache/2.0.47 (U

mod_perl 2: $r->get_server_port returns wrong value

2003-10-08 Thread Matisse Enzer
Is it possible that the value returned by $r->get_server_port could be affected by the format or content of the client request? I've got a test case where when i hit the same URL from two different clients I get different values from $r->get_server_port. This doesn't make sense to me, because I h

Re: mod_perl 2: $r->get_server_port returns wrong value under Apache::compat ??

2003-10-06 Thread Geoffrey Young
I don't think Apache::compat is a culprit, it just doesn't mess with the port methods, however I won't single out that possibility completely, the behavior of ap_get_server_port looks to be very different between apache 1.3 and 2.0, so I suspect the difference is really there. I'd try playing w

Re: mod_perl 2: $r->get_server_port returns wrong value under Apache::compat ??

2003-10-06 Thread Stas Bekman
Matisse Enzer wrote: At 1:20 PM -0700 10/6/03, Stas Bekman wrote: Matisse Enzer wrote: [...] sub handler { warn "Port: ", $_[0]->get_server_port; $server->configure(@_); $server->SUPER::handler(@_); } and got the wrong result. Hmm, is $_[0] an Apache::RequestRec object? If it's a method

Re: mod_perl 2: $r->get_server_port returns wrong value under Apache::compat ??

2003-10-06 Thread Matisse Enzer
At 1:20 PM -0700 10/6/03, Stas Bekman wrote: Matisse Enzer wrote: [...] sub handler { warn "Port: ", $_[0]->get_server_port; $server->configure(@_); $server->SUPER::handler(@_); } and got the wrong result. Hmm, is $_[0] an Apache::RequestRec object? If it's a method handler, should that be

Re: mod_perl 2: $r->get_server_port returns wrong value under Apache::compat ??

2003-10-06 Thread Stas Bekman
Matisse Enzer wrote: [...] sub handler { warn "Port: ", $_[0]->get_server_port; $server->configure(@_); $server->SUPER::handler(@_); } and got the wrong result. Hmm, is $_[0] an Apache::RequestRec object? If it's a method handler, should that be $_[1]? _

Re: mod_perl 2: $r->get_server_port returns wrong value under Apache::compat ??

2003-10-06 Thread Matisse Enzer
At 12:38 PM -0700 10/6/03, Stas Bekman wrote: I don't think Apache::compat is a culprit, it just doesn't mess with the port methods, however I won't single out that possibility completely, Can you reproduce this problem in a simple response handler, without Apache::XMLRPC::Lite? If you can give

Re: mod_perl 2: $r->get_server_port returns wrong value under Apache::compat ??

2003-10-06 Thread Stas Bekman
Matisse Enzer wrote: I've got a server running on port 9000. If I call $r->get_server_port in a PerlResponseHandler I get the correct value (9000), but if I call that in a method when Apache::XMLRPC::Lite is the PerlResponseHandler then I get port 80, no matter what the actual port is. Apach

mod_perl 2: $r->get_server_port returns wrong value under Apache::compat ??

2003-10-06 Thread Matisse Enzer
Title: mod_perl 2: $r->get_server_port returns wrong value un I've got a server running on port 9000. If I callĀ  $r->get_server_portĀ  in a PerlResponseHandler I get the correct value (9000), but if I call that in a method when Apache::XMLRPC::Lite is the PerlResponseHandler then I

Re: mod_perl 2: $r->get_server_port

2003-10-02 Thread Matisse Enzer
The module I'm working on is used by Apache::XMLRPC::Lite to handle requests. 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

Re: mod_perl 2: $r->get_server_port

2003-10-02 Thread Stas Bekman
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 a

mod_perl 2: $r->get_server_port

2003-10-02 Thread Matisse Enzer
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) -- -