On Thu, 2 Dec 1999, Christian Gilmore wrote:
> We just updgraded from apache-1.3.3/mod_perl-1.16 to
> apache-1.3.9/mod_perl-1.21 on solaris-2.5.1. $r->args does not contain any
> data for us now when it did before during the URI translation phase.
[ snip ]
> The module:
>
> package TransTest;
> use lib qw(/weblab/services/pushweb/lib);
> use strict;
> use Apache::Constants ':common';
> use Apache::Log;
>
> sub handler {
> my($r) = @_;
> $r->handler("perl-script");
> $r->push_handlers(PerlHandler => \&transtest_handler);
> return OK;
> }
>
> sub transtest_handler {
> my($r) = @_;
> my $log = $r->server->log;
>
> $log->debug("TransTest Handler entry");
>
> $log->debug("The Entire Request: " . $r->as_string);
> $log->debug("The Request Line: " . $r->the_request);
> $log->debug("The Path Information: " . $r->uri);
> $log->debug("The Args: " . $r->args);
>
> my $response = "<html><body>TransTest ";
> $response .= "response</body></html>\n";
>
> $r->no_cache(1);
> # Apache's no-caching (as of 1.3.0) is broken.
> # It just modifies stamp
> $r->header_out('Pragma', 'no-cache');
> $r->header_out('Cache-control', 'no-cache');
> $r->header_out('Content-Length', length($response));
> $r->send_http_header();
> $r->print($response);
>
> $log->debug("TransTest Handler exit");
> }
you might try referencing $r->main->args because you are passing $r to
your trastest_handler. this has been a consistent thorn in my side for
many applications. sometimes $r->main->args has it, sometimes $r->args,
and sometimes i can successfully use a CGI query object and get it from
$q->param.
hth,
ky