Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 5263 invoked from network); 9 Dec 2008 23:39:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Dec 2008 23:39:12 -0000 Received: (qmail 987 invoked by uid 500); 9 Dec 2008 23:39:20 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 961 invoked by uid 500); 9 Dec 2008 23:39:20 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 944 invoked by uid 99); 9 Dec 2008 23:39:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2008 15:39:20 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of adam.prime@utoronto.ca designates 128.100.132.147 as permitted sender) Received: from [128.100.132.147] (HELO bureau60.ns.utoronto.ca) (128.100.132.147) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2008 23:37:50 +0000 Received: from [10.1.5.118] ([216.235.10.210]) (authenticated bits=0) by bureau60.ns.utoronto.ca (8.13.8/8.13.8) with ESMTP id mB9Nca24028039 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 9 Dec 2008 18:38:38 -0500 Message-ID: <493F017C.7030906@utoronto.ca> Date: Tue, 09 Dec 2008 18:38:36 -0500 From: Adam Prime User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: mod_perl list Subject: solaris, perl 5.8.8, apache 1.3.41, mod_perl 1.30, t/internal/auth.t failure Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Some co-workers were trying to build mod_perl with the setup mentioned in the subject line, and the 2nd test in t/internal/auth.t was failing. This test is really short (and weird IMO) but all it does it issue to requests to the server to test basic auth. the first one should pass dougm and mod_perl as the login credentials and get a 200, and the second request should pass bad and one, and get a 403. In this environment the second test was also sending dougm/mod_perl and thus the test failed. This seems like a perl bug to me more than anything else, but if someone can confirm that for me (and point me at how to report it) it'd be appreciated. Here's the original test: --- use Apache::testold; my $ua = Apache::UserAgent->new; my $url = URI::URL->new("http://$net::httpserver/auth/.htaccess"); my $i; my $request = HTTP::Request->new(GET => $url); unless($net::callback_hooks{PERL_AUTHEN}) { print "1..1\nok 1\n"; exit(0); } print "1..2\n"; my $response = $ua->request($request, undef, undef); test ++$i, $response->is_success; #print $response->as_string; $ua->creds(qw(bad one)); $response = $ua->request($request, undef, undef); test ++$i, $response->is_error; BEGIN { package Apache::UserAgent; @ISA = qw(LWP::UserAgent); @creds = qw(dougm mod_perl); sub get_basic_credentials { shift->creds } sub creds { shift; @creds = @_ if @_; @creds; } } --- and here's what I changed the test to, which gets it to pass: --- use Apache::testold; my $ua = Apache::UserAgent->new; my $ua2 = Apache::UserAgent2->new; my $url = URI::URL->new("http://$net::httpserver/auth/.htaccess"); my $i; my $request = HTTP::Request->new(GET => $url); unless($net::callback_hooks{PERL_AUTHEN}) { print "1..1\nok 1\n"; exit(0); } print "1..2\n"; my $response = $ua->request($request, undef, undef); test ++$i, $response->is_success; #print $response->as_string; $response = $ua2->request($request, undef, undef); test ++$i, $response->is_error; BEGIN { package Apache::UserAgent; @ISA = qw(LWP::UserAgent); @creds = qw(dougm mod_perl); sub get_basic_credentials { shift->creds } sub creds { shift; @creds = @_ if @_; @creds; } package Apache::UserAgent2; @ISA = qw(LWP::UserAgent); @creds = qw(bad one); sub get_basic_credentials { shift->creds } sub creds { shift; @creds = @_ if @_; @creds; } } --- Here's the contents of perl -V, if that's any help. perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=solaris, osvers=2.10, archname=i86pc-solaris uname='sunos fxbuild-i386 5.10 generic_127112-11 i86pc i386 i86pc solaris ' config_args='-Dcc=gcc -Dprefix=/oanda/system' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing -pipe -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DPERL_USE_SAFE_PUTENV', optimize='-O', cppflags='-fno-strict-aliasing -pipe -Wdeclaration-after-statement' ccversion='', gccversion='4.2.1', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc', ldflags =' ' libpth=/usr/lib /usr/ccs/lib /oanda/system/lib libs=-lsocket -lnsl -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' ' cccdlflags='-fPIC', lddlflags='-G' Characteristics of this binary (from libperl): Compile-time options: PERL_MALLOC_WRAP PERL_USE_SAFE_PUTENV USE_LARGE_FILES USE_PERLIO Built under solaris Compiled at Oct 21 2008 11:41:57 @INC: /oanda/system/lib/site_perl/i86pc-solaris /oanda/system/lib/site_perl /oanda/system/lib/site_perl/i86pc-solaris /oanda/system/lib/site_perl /oanda/system/lib/site_perl /oanda/lib/site_perl/i86pc-solaris /oanda/lib/site_perl /oanda/lib/site_perl . Adam