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.
We're running a minimal system, so many modules have been stripped from the
build (included is one home-grown module mod_pushweb which does no
modification whatsoever of request_rec). We put in some extra debug lines into
both apache's httpd_main.c and mod_perl's mod_perl.c.
It appears that both apache and mod_perl internally have r->args correct, yet
it doesn't make it up to the TransTest module. This same TransHandler code
worked just fine in the previous 1.3.3/1.21 build. Can anyone see the problem?
Included below are:
* build commands we used
* httpd.conf snippets relating to mod_perl
* the TransTest module which demonstrates the problem
* the error_log
The build commands for mod_perl:
perl Makefile.PL USE_APACI=1 PERL_TRANS=1 PERL_STACKED_HANDLERS=1
(answer 'y' to the first question, 'n' to the second)
make all
make install
The build commands for apache:
configure
--disable-module=actions \
--disable-module=alias --disable-module=asis \
--disable-module=auth --disable-module=autoindex \
--disable-module=cgi --disable-module=dir \
--disable-module=env --disable-module=imap \
--disable-module=include --disable-module=mime \
--disable-module=negotiation --disable-module=setenvif \
--disable-module=status --disable-module=userdir \
--activate-module=src/modules/mod_pushweb/libmod_pushweb.a \
--activate-module=src/modules/perl/libperl.a \
--enable-module=apache_ssl
make
>From httpd.conf:
PerlRequire /weblab/services/pushweb/lib/TransTest.pm
PerlTransHandler TransTest
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 = "TransTest ";
$response .= "response\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");
}
1;
__END__
>From the error_log:
[Thu Dec 2 17:07:08 1999] [notice] Apache/1.3.9 Ben-SSL/1.37 (Unix)
mod_perl/1.21 configured -- resuming normal operations
[Thu Dec 2 17:07:08 1999] [info] Server built: Dec 1 1999 19:11:25
[Thu Dec 2 17:07:21 1999] [debug] apache_ssl.c(1718): CIPHER is RC4-MD5
[Thu Dec 2 17:07:21 1999] [debug] buff.c(263): read returned 310 rwstate=3
state=3 rstate=240 cren=0 aren=0 accept=1
[Thu Dec 2 17:07:21 1999] [error] [client 135.207.24.19] before ap_parse_uri
[Thu Dec 2 17:07:21 1999] [error] [client 135.207.24.19] after ap_parse_uri
args=foo=bar
[Thu Dec 2 17:07:21 1999] [debug] mod_perl.c(884): before callup to
perltranshandler, args=foo=bar
[Thu Dec 2 17:07:21 1999] [debug] mod_perl.c(887): after callup to
perltranshandler, args=foo=bar
[Thu Dec 2 17:07:21 1999] [debug]
/weblab/services/pushweb/lib/TransTest.pm(18): TransTest Handler entry
[Thu Dec 2 17:07:21 1999] [debug]
/weblab/services/pushweb/lib/TransTest.pm(20): The Entire Request: GET
/login=cgilmore/?foo=bar HTTP/1.0
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, image/png, */*
Accept-Charset: iso-8859-1,*,utf-8
Accept-Encoding: gzip
Accept-Language: en
Connection: Keep-Alive
Host: absent.research.att.com
User-Agent: Mozilla/4.61 [en] (X11; U; SunOS 5.7 sun4u)
HTTP/1.0 (null)
[Thu Dec 2 17:07:21 1999] [debug]
/weblab/services/pushweb/lib/TransTest.pm(21): The Request Line: GET
/login=cgilmore/?foo=bar HTTP/1.0
[Thu Dec 2 17:07:21 1999] [debug]
/weblab/services/pushweb/lib/TransTest.pm(22): The Path Information:
/login=cgilmore/
[Thu Dec 2 17:07:21 1999] [debug]
/weblab/services/pushweb/lib/TransTest.pm(23): The Args:
[Thu Dec 2 17:07:21 1999] [debug]
/weblab/services/pushweb/lib/TransTest.pm(35): TransTest Handler exit
Thanks,
Christian
-
Christian Gilmore
Senior Technical Staff Member
AT&T Labs IP Technology, Florham Park
[EMAIL PROTECTED]
http://www.research.att.com/info/cgilmore