print "got a strange problem"
if mod_perl::VERSION == 1.21 and ($| or client_is_printing("\015\012"))
####
PerlRequire /apache/advinst_test/conf/startup.pl
PerlModule Apache::StatINC
Alias /cgi-registry /apache/advinst_test/cgi-bin
SetHandler perl-script
PerlHandler Apache::Registry
Options ExecCGI
PerlSendHeader On
PerlInitHandler Apache::StatINC
PerlSetVar StatINCDebug On
order deny,allow
allow from all
####
#!/usr/bin/perl -w
use strict;
run_server();
sub debug_post_data()
{
warn "DEBUG: the content length is $ENV{CONTENT_LENGTH}\n";
my $returncode = read(STDIN, my $post_content, $ENV{CONTENT_LENGTH});
warn "DEBUG: the read returncode was $returncode\n";
warn "DEBUG: Finished.\n";
}
sub run_server()
{
$| = 1;
print "Content-Encoding: iso-8859-1\015\012",
"Content-Type: text/plain\015\012",
"\015\012";
debug_post_data();
}
####
#!/usr/bin/perl -w
use strict;
use LWP::UserAgent;
my $server = shift;
my $content_length = shift || 1024;
my $pattern = shift || '#';
my $useragent = LWP::UserAgent->new;
my $http_request = HTTP::Request->new(POST => $server);
$http_request->content_type('text/plain');
$http_request->content($pattern x ($content_length / length($pattern)) );
print "\nRequest Content Length is ", length $http_request->content,".\n";
my $http_response = $useragent->request($http_request);
print "\n\n", $http_response->as_string, "\n";
####
Request Content Length is 11680.
HTTP/1.1 200 OK
Connection: close
Date: Fri, 30 Aug 2002 12:05:38 GMT
Server: Apache/1.3.12 (Unix) mod_perl/1.21 NTLM/2.1
Content-Encoding: iso-8859-1
Content-Type: text/plain
Client-Date: Fri, 30 Aug 2002 12:07:11 GMT
Client-Response-Num: 1
Client-Transfer-Encoding: chunked
####
Request Content Length is 11681.
####
500 (Internal Server Error) read timeout
Client-Date: Fri, 30 Aug 2002 12:10:36 GMT
####
DEBUG: the content length is 11681
DEBUG: the read returncode was 11680
DEBUG: Finished. at /foo/bar/cgi-bin/echo_post_data.pl line 14.
####
Request Content Length is 11681.
500 (Internal Server Error) EOF instead of reponse status line
Client-Date: Fri, 30 Aug 2002 12:20:00 GMT
####
sub read_post_data_chunked(;$$)
{
my $content_length = shift || $ENV{CONTENT_LENGTH};
my $chunk_size = shift || $DEFAULT_CHUNK_SIZE;
my $raw_data;
while($content_length > 0)
{
warn read(STDIN, my $chunk, $chunk_size < $content_length ? $chunk_size : $content_length) . " chars read.\n";
$raw_data .= $chunk;
$content_length -= $chunk_size;
}
return $raw_data;
}
####
Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration:
Platform:
osname=aix, osvers=4.3.1.0, archname=aix
uname='aix hercules 3 4 00001427e800 '
hint=recommended, useposix=true, d_sigaction=define
usethreads=undef useperlio=undef d_sfio=undef
Compiler:
cc='cc', optimize='-O', gccversion=
cppflags='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192 -I/usr/local/include'
ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -qmaxmem=8192 -I/usr/local/include'
stdchar='unsigned char', d_stdstdio=define, usevfork=false
intsize=4, longsize=4, ptrsize=4, doublesize=8
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=8
alignbytes=8, usemymalloc=n, prototype=define
Linker and Libraries:
ld='ld', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib /usr/ccs/lib
libs=-lnsl -lgdbm -ldbm -ldl -lld -lm -lc -lcrypt -lbsd -lPW
libc=, so=a, useshrplib=false, libperl=libperl.a
Dynamic Linking:
dlsrc=dl_aix.xs, dlext=so, d_dlsymun=undef, ccdlflags='-bE:perl.exp'
cccdlflags=' ', lddlflags='-bhalt:4 -bM:SRE -bI:$(PERL_INC)/perl.exp -bE:$(BASEEXT).exp -b noentry -lc -L/usr/local/lib'
Characteristics of this binary (from libperl):
Built under aix
Compiled at Feb 4 2000 10:18:39
@INC:
/usr/local/lib/perl5/5.00503/aix
/usr/local/lib/perl5/5.00503
/usr/local/lib/perl5/site_perl/5.005/aix
/usr/local/lib/perl5/site_perl/5.005
.