From modperl-return-63579-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Sun Mar 2 23:28:00 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 84DE51071C for ; Sun, 2 Mar 2014 23:28:00 +0000 (UTC) Received: (qmail 65607 invoked by uid 500); 2 Mar 2014 23:27:59 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 65512 invoked by uid 500); 2 Mar 2014 23:27:58 -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 65505 invoked by uid 99); 2 Mar 2014 23:27:58 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Mar 2014 23:27:58 +0000 X-ASF-Spam-Status: No, hits=2.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_REPLYTO_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [98.139.213.148] (HELO nm27-vm1.bullet.mail.bf1.yahoo.com) (98.139.213.148) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Mar 2014 23:27:50 +0000 Received: from [98.139.215.142] by nm27.bullet.mail.bf1.yahoo.com with NNFMP; 02 Mar 2014 23:27:29 -0000 Received: from [98.139.212.237] by tm13.bullet.mail.bf1.yahoo.com with NNFMP; 02 Mar 2014 23:27:29 -0000 Received: from [127.0.0.1] by omp1046.mail.bf1.yahoo.com with NNFMP; 02 Mar 2014 23:27:29 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 150449.50242.bm@omp1046.mail.bf1.yahoo.com Received: (qmail 68884 invoked by uid 60001); 2 Mar 2014 23:27:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1393802848; bh=7hY02vCbgZoszINgT7MrPeAV1O8WyhUx0qcz2userik=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=tP2eauRsdD3J7oxbUxhnTs0JAcmxEUt2gCcCU6AShZidOiv0yv+zrl6kqHBOuogF3riaZ+i5KNQm7Yd3WiG9897gzhFisoInVySJvljB+FzbKCx6n+qST2zwqo9u1RmwKaDvd6eEa33bAZbl2g/dNJZoDCmayBuVUlw3srXBH1E= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=vhvw+qNj7dv0gbBaW3ka0BgiL9EdwPyFONmR0DuH2Z5kM4Enurq4/Uq5Tw67jY9h2CNrOIbevImO4lKHEdw/zAF8wbt+jVUyF5gZxcAXgSRaCX8wrtEg8MXJjtPd1yjzKNg7N8o26ypljpOolZU8RwY4nFMQqhgCO8NwFtqZyrA=; X-YMail-OSG: UCOxTt4VM1kXQazFrR_itIQT9tIUpdwZTfC6YOhQ1INBrnB qa9khl9kI_OVNHaMz_ZP9VT_zE3PHu.PBPy2OHSVV.jLBvlKreglj1MAWTs_ 90jKzJgkAnbAXJmCXGaxKd6YiFywbeEAnqVAv2yIufJxLRKvL3QMoCJp2uid RNoN5orxXHSVPtoMnFbMN_PtSbgolFy0ZxwMIVwamOqbzkI.MRikG773P6.7 tkAwX0RhEwTPu5mw7Pa7_cuEDuE7uqNPR3mIKSWW62pgqKnz5hhg1.EVgjn7 JJGrjO0.yYfRFC5dtYjxkcKj1pBdBWqJrkDxtlfhv5jWqlEPnHvGLPFN2x1J vBCWk_fdXz0YASbi3aqjN7u1i7x9_K9rHcqfTqSWXINBoEPSc0qfHy9MnmDZ QdhyC4KJ7XSUEwfQ8xdEBYV1GEljXfgiUI0eiXKSEe5942J80w_bqbtQ8SIK Q7EKKoyn3cUnlu0XBWr6ZPGEU2QQ9P53vkRwGnfCpSBmAy4hbTn4lf84OJH0 etYdMLV6Bv.FhzczI02Z2Ak0iuzP0eHBCq1TJZoaG6YhRM9TIuFaYlYTcCXg LK5l6vikMVwTTmn93CRpTvQxnR0gv7eW9y6nk2Wfc23ugd7Z1yKieC0kawVk xL9hpGKTdUDvduO4SYmaRQiGcl7v70ZpMNA7tn9Iao43rsDq9DHb2Ht_kOeF 0L1yDuhTTqFnQc_qTuQ2Tn_jSNMTTMntEJAhilF64M3FrS9gzh9KqKuXq5TO Jg2nFsALAfjB_PMAixzHCsafviqyCIMiQbKABqfPRBFEd6RxvMCBEesQKHqf EaEel54IKjl9Q6D.y4fetKNmS_.2NM9xqTDdqOxcC_FXufkHFWK0LAPaxh1a ANqWUybrPKmVN50oClL.5qHnrMUHFkDKX9GLCkf.W2rPNaVCAaWb5IVPpRcD wxW1wlGxNJDUwlB5FlIbGOYinMmv6Efjd95k- Received: from [140.159.2.34] by web140406.mail.bf1.yahoo.com via HTTP; Sun, 02 Mar 2014 15:27:28 PST X-Rocket-MIMEInfo: 002.001,SGksCgpXZSBoYXZlIGp1c3QgaW5zdGFsbGVkIEF1dGggaGFuZGxlcgooQXBhY2hlICkgdXNpbmcgbW9kX3BlcmwyIGFuZCBDQVMuIAoKMS4gSW5pdGlhbGx5LCB3ZSBoYWQgdGhlIEludGVybmFsClNlcnZlciBFcnJvciAiRXhwZWN0ZWQgdG9rZW4gbm90IHByZXNlbnQiLCBhcyBwZXIgdGhlc2UKYmVsb3cgbGlua3Mgc3VnZ2VzdGVkIHRoaXMgY291bGQgYmUgYmVjYXVzZSBvZiBvdXIgaW52YWxpZCBjb29raWUKZm9ybWF0LiBCdXQgZm9yIG91ciBhcHBsaWNhdGlvbiB0byB3b3JrLCB3ZSBuZWVkIHRob3NlIGMBMAEBAQE- X-Mailer: YahooMailWebService/0.8.177.636 Message-ID: <1393802848.13741.YahooMailNeo@web140406.mail.bf1.yahoo.com> Date: Sun, 2 Mar 2014 15:27:28 -0800 (PST) From: Pinate Aramsangrungroj Reply-To: Pinate Aramsangrungroj Subject: Can't call method "jar" without a package or object reference - mod_perl2 To: "modperl@perl.apache.org" MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="-645100006-1362313195-1393802848=:13741" X-Virus-Checked: Checked by ClamAV on apache.org ---645100006-1362313195-1393802848=:13741 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi,=0A=0AWe have just installed Auth handler=0A(Apache ) using mod_perl2 an= d CAS. =0A=0A1. Initially, we had the Internal=0AServer Error "Expected tok= en not present", as per these=0Abelow links suggested this could be because= of our invalid cookie=0Aformat. But for our application to work, we need t= hose cookies=0A=0Ahttp://stackoverflow.com/questions/8594363/why-am-i-getti= ng-a-expected-token-not-present-in-my-apache-log =0Ahttp://beutelevision.co= m/blog2/2012/05/25/quick-fix-for-expected-token-not-present-in-apache2cooki= e/ =0A=0ASo we changed Cookie.pm as seen below =0A=0AReplace from =0A=0Amy = $jar =3D $req->jar or return;=0A$jar->cookie_class(__PACKAGE__); =0Areturn = $jar->get(shift) if @_; =0Areturn wantarray ? %$jar : $jar; =0A=0Ato =0A=0A= my $jar =3D eval {$req->jar()} ||=0A$@->jar; #------------line 42 =0Aeval{$= jar->cookie_class(__PACKAGE__)}; =0Areturn $jar->get(shift) if @_; =0Aretur= n wantarray ? %$jar : $jar; =0A=0AMy interpretation of the code in=0Aline#4= 2 is if there is some parsing error of cookie, ignore the error=0Aand use t= hat cookie anyway. =0A=0A2. This fixed the above error, all is=0Aworking fi= ne in our internal network..we can browse the web=0A3. However, when we acc= ess the target=0Aapplication from external via vpn and also with some brows= ers. We are=0Ahaving below error =0ACan't call method "jar"=0Awithout a pac= kage or object reference at=0A/usr/lib64/perl5/vendor_perl/Apache2/Cookie.p= m =0A=0ACan someone shed some light into this?=0A=0AFYI, based on my troubl= eshooting and=0Ainvestigation I can see that there is still cookie parsing = error from=0Aexecuting eval {$req->jar()} in line 42, but somehow $@ is=0Au= ndefined. =0AHence calling $@->jar cause such an=0Aerror. =0A=0ADon't know = why it is only failing in=0Acertain conditions as explained? Could anyone s= uggest some direction=0Aor a possible solution? =0A=0AThanks=0A=0APinate=0A ---645100006-1362313195-1393802848=:13741 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi,
=0A

=0A
=0A
We have just installed Auth handler=0A(Apache ) using mod_= perl2 and CAS. =0A
=0A

=0A
=0A
1. Initially, we had the Internal=0AServer Error "Expected tok= en not present", as per these=0Abelow links suggested this could be because= of our invalid cookie=0Aformat. But for our application to work, we need t= hose cookies
=0A
=
=0A
=0A
=0Ahttp://stackoverflow.com/questions/8594363/why-am-i-getting-a-exp= ected-token-not-present-in-my-apache-log=0A
=0Ahttp://beutelevision.com/blog2/2012/05= /25/quick-fix-for-expected-token-not-present-in-apache2cookie/=0A=0A

=0A=0A
So we changed C= ookie.pm as seen below =0A
=0A

=0A
=0A
Replace from =0A
=0A

=0A
=0A
my $jar =3D $req->jar or return;<= /div>=0A
$jar->cook= ie_class(__PACKAGE__); =0A
=0A
return $jar->get(shift) if @_; =0A
=0A
return wantarray ? %$jar= : $jar; =0A
=0A
=
=0A
=0A
to =0A
=0A

=0A
=0A
eval{$jar->cookie_class(__PACKAGE__)};=0A
=0A=
return $jar->get(shift) if @_; = =0A
=0A
ret= urn wantarray ? %$jar : $jar; =0A
=0A

=0A
=0A
My interpretation of the code in=0Aline#42 is= if there is some parsing error of cookie, ignore the error=0Aand use that = cookie anyway. =0A
=0A

=0A
=0A
2. This fixed the above error, all is=0Aworking fine in our in= ternal network..we can browse the web
=0A
3. However, when we access the target=0Aappl= ication from external via vpn and also with some browsers. We are=0Ahaving = below error =0A
=0A
Can't call method "jar"=0Awithout a package or object reference at= =0A/usr/lib64/perl5/vendor_perl/Apache2/Cookie.pm =0A
=0A=

=0A
= =0A
Can someone shed some lig= ht into this?
=0A

=0A
=0A
Hence calling $@->jar cause suc= h an=0Aerror. =0A
=0A

=0A
=0A
Don't know why it is only failing in=0Acertain conditions as ex= plained? Could anyone suggest some direction=0Aor a possible solution? =0A<= /span>
=0A

=0A=
=0A
Thanks=

Pinate
---645100006-1362313195-1393802848=:13741-- From modperl-return-63580-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Mon Mar 17 16:48:24 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 98FC4CD8F for ; Mon, 17 Mar 2014 16:48:24 +0000 (UTC) Received: (qmail 27074 invoked by uid 500); 17 Mar 2014 16:48:23 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 22435 invoked by uid 500); 17 Mar 2014 16:48:13 -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 22234 invoked by uid 99); 17 Mar 2014 16:48:10 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2014 16:48:10 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mschout@gkg.net designates 208.180.25.111 as permitted sender) Received: from [208.180.25.111] (HELO smtp-a.gkg.net) (208.180.25.111) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2014 16:48:03 +0000 Received: from lothlorien.snowcrash.lan (proxy.gkg.net [208.180.24.220]) by smtp-a.gkg.net (Postfix) with ESMTPSA id 944775CBAEB for ; Mon, 17 Mar 2014 11:47:42 -0500 (CDT) Message-ID: <5327272C.8050601@gkg.net> Date: Mon, 17 Mar 2014 11:47:40 -0500 From: Michael Schout User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: modperl@perl.apache.org Subject: PATCH: add -DAPACHE24 support to Apache::Test - necessary for Auth with Apache 2.4 X-Enigmail-Version: 1.6 Content-Type: multipart/mixed; boundary="------------070001030504050504080206" X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------070001030504050504080206 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi. I have submitted this issue a while back to rt.cpan.org, but I have not gotten any response. I am the maintainer of Apache::AuthCookie. As most of us probably already know, Apache 2.4 has a very different authentication API from previous Apache versions. As a result, in order to release a version of Apache::AuthCookie that passes tests on Apache 2.4 and previous versions, it is necessary to have conditional config sections that are only enabled for Apache 2.4 or later. Currently Apache::Test defines APACHE2 if running under apache 2.0 or later. The attached patch also defines APACHE24 if running under apache 2 with a minor version >= 4. I shipped a patch for AuthCookie to the debian folks that works under Apache 2.4, but I also need this patch in Apache::Test in order to make it so that the test suite will work on all Apache versions (2.4 as well as 2.2 and earlier) Example in AuthCookie t/conf/extra.conf.in: # Apache 2.4+ Auth API PerlAddAuthzProvider user My::Auth->authz ... ... # Pre Apache 2.4 Auth API. PerlAuthzHandler .... Hopefully this makes it clear why this is needed, and why I'd like to see this in Apache::Test before mod_perl for apache 2.4 is finalized. Regards, Michael Schout --------------070001030504050504080206 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="ap-test-apache24-define.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="ap-test-apache24-define.patch" ZGlmZiAtLWdpdCBhL0FwYWNoZS1UZXN0L2xpYi9BcGFjaGUvVGVzdFNlcnZlci5wbSBiL0Fw YWNoZS1UZXN0L2xpYi9BcGFjaGUvVGVzdFNlcnZlci5wbQppbmRleCAyNTRhZWM2Li5hM2Jj M2FiIDEwMDY0NAotLS0gYS9BcGFjaGUtVGVzdC9saWIvQXBhY2hlL1Rlc3RTZXJ2ZXIucG0K KysrIGIvQXBhY2hlLVRlc3QvbGliL0FwYWNoZS9UZXN0U2VydmVyLnBtCkBAIC04NSw2ICs4 NSwxNSBAQCBzdWIgcG9zdF9jb25maWcgewogICAgICAgICAkc2VsZi0+e3Jldn0gPSAwOyAj IHVua25vd24KICAgICB9CiAKKyAgICAoJHNlbGYtPntyZXZtaW5vcn0pID0gJHNlbGYtPnt2 ZXJzaW9ufSA9fiBtfC9cZFwuKFxkKXw7CisKKyAgICBpZiAoJHNlbGYtPntyZXZtaW5vcn0p IHsKKyAgICAgICAgZGVidWcgIk1hdGNoZWQgQXBhY2hlIHJldm1pbm9yICRzZWxmLT57dmVy c2lvbn0gJHNlbGYtPntyZXZtaW5vcn0iOworICAgIH0KKyAgICBlbHNlIHsKKyAgICAgICAg JHNlbGYtPntyZXZtaW5vcn0gPSAwOworICAgIH0KKwogICAgICRzZWxmOwogfQogCkBAIC0x MjYsNyArMTM1LDE0IEBAIHN1YiBwaWRfZmlsZSB7CiAKIHN1YiBkdmVyc2lvbiB7CiAgICAg bXkgJHNlbGYgPSBzaGlmdDsKLSAgICAiLUQgQVBBQ0hFJHNlbGYtPntyZXZ9IjsKKworICAg IG15ICRkdiA9ICItRCBBUEFDSEUkc2VsZi0+e3Jldn0iOworCisgICAgaWYgKCRzZWxmLT57 cmV2fSA9PSAyIGFuZCAkc2VsZi0+e3Jldm1pbm9yfSA+PSA0KSB7CisgICAgICAgICRkdiAu PSAiIC1EIEFQQUNIRTI0IjsKKyAgICB9CisKKyAgICByZXR1cm4gJGR2OwogfQogCiBzdWIg Y29uZmlnX2RlZmluZXMgewo= --------------070001030504050504080206-- From modperl-return-63581-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Mon Mar 17 18:59:15 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9AB0410426 for ; Mon, 17 Mar 2014 18:59:15 +0000 (UTC) Received: (qmail 90376 invoked by uid 500); 17 Mar 2014 18:59:15 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 89377 invoked by uid 500); 17 Mar 2014 18:59:09 -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 89365 invoked by uid 99); 17 Mar 2014 18:59:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2014 18:59:08 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2014 18:59:01 +0000 Received: from [192.168.245.129] (montserrat.wissensbank.com [212.85.37.175]) (Authenticated sender: andre.warnier@ice-sa.com) by tor.combios.es (Postfix) with ESMTPA id 3C97E3C01F2 for ; Mon, 17 Mar 2014 19:59:05 +0100 (CET) Message-ID: <532745DC.1020804@ice-sa.com> Date: Mon, 17 Mar 2014 19:58:36 +0100 From: =?UTF-8?B?QW5kcsOpIFdhcm5pZXI=?= Reply-To: mod_perl list User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: mod_perl list Subject: Re: PATCH: add -DAPACHE24 support to Apache::Test - necessary for Auth with Apache 2.4 References: <5327272C.8050601@gkg.net> In-Reply-To: <5327272C.8050601@gkg.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Not an answer to your question, but many thanks for that module, for keeping it up-to-date, and for pointing out the differences in Apache 2.4. I used Apache::Cookie as a base to create my own module which does just about every authentication under the sun (for a particular back-end), and it was very valuable. It looks like I'll have my work cut out to adapt to Apache 2.4 though. Incidentally, where can I find a description of the new Apache 2.4 API ? Michael Schout wrote: > Hi. > > I have submitted this issue a while back to rt.cpan.org, but I have not > gotten any response. > > I am the maintainer of Apache::AuthCookie. > > As most of us probably already know, Apache 2.4 has a very different > authentication API from previous Apache versions. As a result, in order > to release a version of Apache::AuthCookie that passes tests on Apache > 2.4 and previous versions, it is necessary to have conditional config > sections that are only enabled for Apache 2.4 or later. > > Currently Apache::Test defines APACHE2 if running under apache 2.0 or > later. The attached patch also defines APACHE24 if running under apache > 2 with a minor version >= 4. > > I shipped a patch for AuthCookie to the debian folks that works under > Apache 2.4, but I also need this patch in Apache::Test in order to make > it so that the test suite will work on all Apache versions (2.4 as well > as 2.2 and earlier) > > Example in AuthCookie t/conf/extra.conf.in: > > > # Apache 2.4+ Auth API > PerlAddAuthzProvider user My::Auth->authz > > ... > > ... > > # Pre Apache 2.4 Auth API. > PerlAuthzHandler .... > > > > Hopefully this makes it clear why this is needed, and why I'd like to > see this in Apache::Test before mod_perl for apache 2.4 is finalized. > > Regards, > Michael Schout > From modperl-return-63582-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Mon Mar 17 21:04:26 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C6CBD10A9C for ; Mon, 17 Mar 2014 21:04:26 +0000 (UTC) Received: (qmail 68743 invoked by uid 500); 17 Mar 2014 21:04:25 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 68661 invoked by uid 500); 17 Mar 2014 21:04:25 -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 68651 invoked by uid 99); 17 Mar 2014 21:04:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2014 21:04:24 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mschout@gkg.net designates 208.180.25.111 as permitted sender) Received: from [208.180.25.111] (HELO smtp-a.gkg.net) (208.180.25.111) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 17 Mar 2014 21:04:18 +0000 Received: from lothlorien.snowcrash.lan (proxy.gkg.net [208.180.24.220]) by smtp-a.gkg.net (Postfix) with ESMTPSA id 7B24E5CBAAB; Mon, 17 Mar 2014 16:03:57 -0500 (CDT) Message-ID: <5327633B.3010502@gkg.net> Date: Mon, 17 Mar 2014 16:03:55 -0500 From: Michael Schout User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 MIME-Version: 1.0 To: mod_perl list CC: aw@ice-sa.com Subject: Re: PATCH: add -DAPACHE24 support to Apache::Test - necessary for Auth with Apache 2.4 References: <5327272C.8050601@gkg.net> <532745DC.1020804@ice-sa.com> In-Reply-To: <532745DC.1020804@ice-sa.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On 3/17/14, 1:58 PM, André Warnier wrote: > Not an answer to your question, but many thanks for that module, for > keeping it up-to-date, and for pointing out the differences in Apache 2.4. Thanks! > Incidentally, where can I find a description of the new Apache 2.4 API ? I'm not sure there is really a place that it is documented extensively anywhere in one place. I figured it out from reading these pages: http://httpd.apache.org/docs/current/developer/new_api_2_4.html https://httpd.apache.org/docs/trunk/upgrading.html https://httpd.apache.org/docs/trunk/howto/auth.html https://httpd.apache.org/docs/trunk/mod/mod_auth_basic.html#authbasicprovider as well as reading source code for the various apache modules in httpd 2.4 source (e.g.: mod_auth_basic.c, mod_authz_user.c etc) and the mod_perl patch for apache 2.4 to figure out how the new directives have been implemented in mod_perl. Basically it comes down to needing to do the following for Apache 2.4: declare your Authz handler with something like: > PerlAddAuthzProvider user Sample::Apache2::AuthCookieHandler->authz_handler Assuming you want to send Forbidden response if Authz fails (which is what previous versions did): > > AuthzSendForbiddenOnFailure On > And REMOVE any PerlAuthzHandler entries you have configured (this is what the PerlAddAuthzProvider does instead). Also Require defaults to satisfy Any now, so if you had: Require user foo Require user bar You have to wrap that in now. Feel free to look at the httpd24 branch of AuthCookie on github to see how I implemented it. Regards, Michael Schout From modperl-return-63583-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Tue Mar 18 15:59:42 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B037410382 for ; Tue, 18 Mar 2014 15:59:42 +0000 (UTC) Received: (qmail 38827 invoked by uid 500); 18 Mar 2014 15:59:41 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 37246 invoked by uid 500); 18 Mar 2014 15:59:32 -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 37023 invoked by uid 99); 18 Mar 2014 15:59:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 15:59:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.160.49] (HELO mail-pb0-f49.google.com) (209.85.160.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 15:59:24 +0000 Received: by mail-pb0-f49.google.com with SMTP id jt11so7390693pbb.8 for ; Tue, 18 Mar 2014 08:59:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=qZ7RpBMY/lMLAoTA2rPOEMcCX8bd0BLwgrJWIpZ7cE0=; b=Ha/1S4Gdxp0zNCJt9xNTqCkW/PdFn0t6DLC2J/RVJ/7RBixARf4rRhTLzFXlMs42a4 D7xc/wkwU6jdemP4RDp+SJBjlIeOwWJjtd86uYijcAPAKysLukTK3D369UWyuaRfaxFw HkwIjIU8et1MUboCQd75IVzOoeQQ2GnQNx3nJy9Br6YEduq+Q472xOdMbqsW2Ad4OKYG GrO+La1oI+oEGjXy3p25Zz7SoM8/oUeXK/HiasCuWtQF0FQ8yheud5RWjxwTyqbwxOqe jlQtdOdDONkowmoPWfEJGzJTeRh0LUrTHHm0rC93XeKjK8yZJbG5b5w91h8UPZ6qw4PL gCuQ== X-Gm-Message-State: ALoCoQmuDExqGvCmwtmP7GQ38ZTi5TRBPLCPbea7mcFFHbunxM3W9grxlGv1OuR9qb8Kj0fGnpbE MIME-Version: 1.0 X-Received: by 10.66.122.201 with SMTP id lu9mr33491279pab.40.1395158342235; Tue, 18 Mar 2014 08:59:02 -0700 (PDT) Received: by 10.70.67.36 with HTTP; Tue, 18 Mar 2014 08:59:02 -0700 (PDT) Date: Tue, 18 Mar 2014 11:59:02 -0400 Message-ID: Subject: Custom response problem From: John Dunlap To: mod_perl list Content-Type: multipart/alternative; boundary=047d7bf0e4346511ab04f4e39de6 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bf0e4346511ab04f4e39de6 Content-Type: text/plain; charset=ISO-8859-1 I recently upgraded my workstation from Debian 6 to Debian 7 and I'm now encountering a problem that I haven't seen before. My apache version is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing that I have an installation problem of some kind but I'm not sure where to look for problems. My application works correctly until I attempt to define a custom response, as follows, sub handler { my $apache = shift; $apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, 'hi mom'); return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR; } I see a 500 error, which is what I want, when I access the page. However the error page is the default apache 500 error response page and I want to override it. When I look in the logs, I see this: [Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can't locate object method "custom_response" via package "Apache2::RequestRec" at /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm line 41. This would imply, at least to me, that this method is not compiled into mod_perl or perhaps into apache itself but I cannot be sure. Any suggestions? Cheers! John --047d7bf0e4346511ab04f4e39de6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I recently upgraded my workstation from Debian 6 to Debian= 7 and I'm now encountering a problem that I haven't seen before. M= y apache version is=A02.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I&#= 39;m guessing that I have an installation problem of=A0some kind but I'= m not sure where to look for problems. My application works correctly until= I attempt to define a custom response, as follows,

sub handler {
my $apache =3D shift;=A0
$apache->custom_response= (Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, 'hi mom');
return Apache= 2::Const::HTTP_INTERNAL_SERVER_ERROR;
}

<= /div>
I see a 500 error, which is what I want, when I access the page. = However the error page is the default apache 500 error response page and I = want to override it. When I look in the logs, I see this:

[Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] C= an't locate object method "custom_response" via package "= ;Apache2::RequestRec" at /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V= 4/WS/RS/BootstrapHandler.pm line 41.

This would imply, at least to me, that this metho= d is not compiled into mod_perl or perhaps into apache itself but I cannot = be sure. Any suggestions?

Cheers!
John

--047d7bf0e4346511ab04f4e39de6-- From modperl-return-63584-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Tue Mar 18 16:13:52 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EDDBB1044F for ; Tue, 18 Mar 2014 16:13:52 +0000 (UTC) Received: (qmail 71914 invoked by uid 500); 18 Mar 2014 16:13:52 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 71682 invoked by uid 500); 18 Mar 2014 16:13:51 -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 71675 invoked by uid 99); 18 Mar 2014 16:13:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:13:50 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [212.227.17.11] (HELO mout.web.de) (212.227.17.11) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:13:43 +0000 Received: from augsburg2 ([80.81.14.43]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0LfztP-1WtStl0QYN-00pcn6 for ; Tue, 18 Mar 2014 17:13:22 +0100 From: "Andreas Mock" To: "'mod_perl list'" References: In-Reply-To: Subject: AW: Custom response problem Date: Tue, 18 Mar 2014 17:13:07 +0100 Message-ID: <00af01cf42c4$f8a79830$e9f6c890$@web.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00B0_01CF42CD.5A6C0030" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJpIqMSJI4/oL23TaAIyzT+s9q++JmzRFeA Content-Language: de X-Provags-ID: V03:K0:Lcn0KdIluH7sN8Rqka82prEtWATs6nDihYynyrWEcThE8vNzf0h o1b+FABhr/pLtVv8yy3IjU4RDQ/02g7FzeiXLuGl6H4EbbPZJwEBjfy4fy9VzV2kepeLeY3 ahbNISp+5kkqIsRM77jgkBBExdAnn4YqwyoxbvLcikRA/ZrySQIInhEjr6sDJWASaEfkQaE hDyYKpCHZfMuc/BlyWvzQ== X-Virus-Checked: Checked by ClamAV on apache.org This is a multipart message in MIME format. ------=_NextPart_000_00B0_01CF42CD.5A6C0030 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Have you loaded Apache2::RequestRec? =20 Best regards Andreas Mock =20 =20 Von: John Dunlap [mailto:john@lariat.co]=20 Gesendet: Dienstag, 18. M=E4rz 2014 16:59 An: mod_perl list Betreff: Custom response problem =20 I recently upgraded my workstation from Debian 6 to Debian 7 and I'm now encountering a problem that I haven't seen before. My apache version is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing that I = have an installation problem of some kind but I'm not sure where to look for problems. My application works correctly until I attempt to define a = custom response, as follows, =20 sub handler { my $apache =3D shift;=20 =20 $apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, 'hi mom'); return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR; } =20 I see a 500 error, which is what I want, when I access the page. However = the error page is the default apache 500 error response page and I want to override it. When I look in the logs, I see this: =20 [Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can't locate = object method "custom_response" via package "Apache2::RequestRec" at /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm line 41. =20 This would imply, at least to me, that this method is not compiled into mod_perl or perhaps into apache itself but I cannot be sure. Any suggestions? =20 Cheers! John =20 ------=_NextPart_000_00B0_01CF42CD.5A6C0030 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Have = you loaded Apache2::RequestRec?

 

Best regards

Andreas Mock

 

 

Von:<= /b> = John Dunlap [mailto:john@lariat.co]
Gesendet: Dienstag, 18. = M=E4rz 2014 16:59
An: mod_perl list
Betreff: Custom = response problem

 

I = recently upgraded my workstation from Debian 6 to Debian 7 and I'm now = encountering a problem that I haven't seen before. My apache version = is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing = that I have an installation problem of some kind but I'm not sure = where to look for problems. My application works correctly until I = attempt to define a custom response, as follows,

 

sub handler {

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 my $apache =3D = shift; 

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = $apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, = 'hi mom');

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return = Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;

}

 

I = see a 500 error, which is what I want, when I access the page. However = the error page is the default apache 500 error response page and I want = to override it. When I look in the logs, I see = this:

 

[Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] = Can't locate object method "custom_response" via package = "Apache2::RequestRec" at = /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm = line 41.

 

This would imply, at least to me, that this method is = not compiled into mod_perl or perhaps into apache itself but I cannot be = sure. Any suggestions?

 

Cheers!

John

 

------=_NextPart_000_00B0_01CF42CD.5A6C0030-- From modperl-return-63585-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Tue Mar 18 16:16:30 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 75CDD1045D for ; Tue, 18 Mar 2014 16:16:30 +0000 (UTC) Received: (qmail 76643 invoked by uid 500); 18 Mar 2014 16:16:29 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 76234 invoked by uid 500); 18 Mar 2014 16:16:27 -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 75795 invoked by uid 99); 18 Mar 2014 16:16:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:16:26 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.160.42] (HELO mail-pb0-f42.google.com) (209.85.160.42) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:16:21 +0000 Received: by mail-pb0-f42.google.com with SMTP id rr13so7511998pbb.15 for ; Tue, 18 Mar 2014 09:16:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=vlIvvXGi6+0Hi/defp6Nki6JS4v+cgLrHMEx0qYOT0U=; b=Cpdym2dnajOt8B2/uXc/gdTKl1V1lPisq/TZvJ58uXQ8xWEYMIhebp7KwGtykHiKtL 2ftOg5bWjYayQWI+ipxJtkcAyzBsjqaXIV2V5tOW+Dhsj1bVTGF3oLkwi8A1IbkPgfGv WhdWPvQ/+Nwf+GtdvSpiMUBQCFMcWMR5OwNUufWZQdjzlepnBOkYg+RD8gn3pOTDQuXq FyW9fG1Qa8cK7Id7SNiN8FPwLADG29/HlqMMrLizVbHUtN5HU0no0s3gaMRTfWVqY/2X mZuaMVx7x7P6KOPeOp5sNZLzWXBlc3ENF9a98JBZaOGn60WCdQOySEnjtqXCtqeYPBda 5MfA== X-Gm-Message-State: ALoCoQlguaQ0DR7Vvq8GiH9GN5HDYNTttB0GtFKMFGp1S7p7h6newdIgU+PkiV0+PKMS4+lBDFV/ MIME-Version: 1.0 X-Received: by 10.68.113.194 with SMTP id ja2mr34060636pbb.30.1395159360639; Tue, 18 Mar 2014 09:16:00 -0700 (PDT) Received: by 10.70.67.36 with HTTP; Tue, 18 Mar 2014 09:16:00 -0700 (PDT) In-Reply-To: <00af01cf42c4$f8a79830$e9f6c890$@web.de> References: <00af01cf42c4$f8a79830$e9f6c890$@web.de> Date: Tue, 18 Mar 2014 12:16:00 -0400 Message-ID: Subject: Re: Custom response problem From: John Dunlap To: Andreas Mock Cc: mod_perl list Content-Type: multipart/alternative; boundary=047d7b6dce4018acba04f4e3da6e X-Virus-Checked: Checked by ClamAV on apache.org --047d7b6dce4018acba04f4e3da6e Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I've tried it with "use Apache2::RequestRec;" at the top of my handler and without it. The outcome is the same in both cases. If I attempt to install it from CPAN, it says that it is already installed. On Tue, Mar 18, 2014 at 12:13 PM, Andreas Mock wrote: > Have you loaded Apache2::RequestRec? > > > > Best regards > > Andreas Mock > > > > > > *Von:* John Dunlap [mailto:john@lariat.co] > *Gesendet:* Dienstag, 18. M=E4rz 2014 16:59 > *An:* mod_perl list > *Betreff:* Custom response problem > > > > I recently upgraded my workstation from Debian 6 to Debian 7 and I'm now > encountering a problem that I haven't seen before. My apache version > is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing that I > have an installation problem of some kind but I'm not sure where to look > for problems. My application works correctly until I attempt to define a > custom response, as follows, > > > > sub handler { > > my $apache =3D shift; > > > $apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, 'hi > mom'); > > return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR; > > } > > > > I see a 500 error, which is what I want, when I access the page. However > the error page is the default apache 500 error response page and I want t= o > override it. When I look in the logs, I see this: > > > > [Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can't locate object > method "custom_response" via package "Apache2::RequestRec" at > /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm > line 41. > > > > This would imply, at least to me, that this method is not compiled into > mod_perl or perhaps into apache itself but I cannot be sure. Any > suggestions? > > > > Cheers! > > John > > > --047d7b6dce4018acba04f4e3da6e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I've tried it with "use Apache2::RequestRec;"= ; at the top of my handler and without it. The outcome is the same in both = cases. If I attempt to install it from CPAN, it says that it is already ins= talled.


On Tue, Mar 1= 8, 2014 at 12:13 PM, Andreas Mock <andreas.mock@web.de> wr= ote:

Have you loaded Apache2::RequestRec?

=A0

Best reg= ards

Andreas Mock

=A0

=A0

Von: John Dunlap [mailto:john@lariat.co]
Gesendet: Dienstag, 18. M=E4rz 2014 16:59
An: mod_perl lis= t
Betreff: Custom response problem

<= div class=3D"h5">

=A0

I recently upgraded my workstation from Debian 6 to Debian 7 and I'm no= w encountering a problem that I haven't seen before. My apache version = is=A02.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing tha= t I have an installation problem of=A0some kind but I'm not sure where = to look for problems. My application works correctly until I attempt to def= ine a custom response, as follows,

=A0

sub handler {

= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 my $apache =3D shift;=A0

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 $apache->= custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, 'hi mom'= ;);

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return = Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;

}

=A0

I see a 500 error, which is what I want, when I= access the page. However the error page is the default apache 500 error re= sponse page and I want to override it. When I look in the logs, I see this:=

=A0

[Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can= 9;t locate object method "custom_response" via package "Apac= he2::RequestRec" at /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/= RS/BootstrapHandler.pm line 41.

=A0

This would imply, at least to me, that this method is not co= mpiled into mod_perl or perhaps into apache itself but I cannot be sure. An= y suggestions?

=A0

Cheers!

J= ohn

=A0


--047d7b6dce4018acba04f4e3da6e-- From modperl-return-63586-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Tue Mar 18 16:25:49 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 92F9B104F7 for ; Tue, 18 Mar 2014 16:25:49 +0000 (UTC) Received: (qmail 1871 invoked by uid 500); 18 Mar 2014 16:25:37 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 1830 invoked by uid 500); 18 Mar 2014 16:25:36 -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 1790 invoked by uid 99); 18 Mar 2014 16:25:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:25:34 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of js5@sanger.ac.uk designates 193.62.202.235 as permitted sender) Received: from [193.62.202.235] (HELO smtp.sanger.ac.uk) (193.62.202.235) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:25:27 +0000 Received: from dell101392.internal.sanger.ac.uk ([172.20.10.133]) by intmail3a.internal.sanger.ac.uk with esmtpsa (TLSv1:DHE-RSA-CAMELLIA256-SHA:256) (Exim 4.80.1) (envelope-from ) id 1WPwp8-000Enp-GM for modperl@perl.apache.org; Tue, 18 Mar 2014 16:25:06 +0000 Message-ID: <53287360.2050201@sanger.ac.uk> Date: Tue, 18 Mar 2014 16:25:04 +0000 From: James Smith User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20120312 Thunderbird/11.0 MIME-Version: 1.0 To: modperl@perl.apache.org Subject: Re: Custom response problem References: <00af01cf42c4$f8a79830$e9f6c890$@web.de> In-Reply-To: Content-Type: multipart/alternative; boundary="------------020708020005050604030200" X-Message-Source: dell101392.internal.sanger.ac.uk X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. --------------020708020005050604030200 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Try: use Apache2::Response (); This should add the method to $r (a lot of the Apache2:: modules do this - Apache2::RequestUtil, Apache2::Upload etc) On 18/03/2014 16:16, John Dunlap wrote: > I've tried it with "use Apache2::RequestRec;" at the top of my handler > and without it. The outcome is the same in both cases. If I attempt to > install it from CPAN, it says that it is already installed. > > > On Tue, Mar 18, 2014 at 12:13 PM, Andreas Mock > wrote: > > Have you loaded Apache2::RequestRec? > > Best regards > > Andreas Mock > > *Von:*John Dunlap [mailto:john@lariat.co ] > *Gesendet:* Dienstag, 18. März 2014 16:59 > *An:* mod_perl list > *Betreff:* Custom response problem > > I recently upgraded my workstation from Debian 6 to Debian 7 and > I'm now encountering a problem that I haven't seen before. My > apache version is 2.2.22-13+deb7u1. My mod_perl version is > 2.0.7-3. I'm guessing that I have an installation problem of some > kind but I'm not sure where to look for problems. My application > works correctly until I attempt to define a custom response, as > follows, > > sub handler { > > my $apache = shift; > > > $apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, > 'hi mom'); > > return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR; > > } > > I see a 500 error, which is what I want, when I access the page. > However the error page is the default apache 500 error response > page and I want to override it. When I look in the logs, I see this: > > [Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can't locate > object method "custom_response" via package "Apache2::RequestRec" > at > /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm > line 41. > > This would imply, at least to me, that this method is not compiled > into mod_perl or perhaps into apache itself but I cannot be sure. > Any suggestions? > > Cheers! > > John > > -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. --------------020708020005050604030200 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
Try:

     use Apache2::Response ();

This should add the method to $r (a lot of the Apache2:: modules do this - Apache2::RequestUtil, Apache2::Upload etc)
On 18/03/2014 16:16, John Dunlap wrote:
I've tried it with "use Apache2::RequestRec;" at the top of my handler and without it. The outcome is the same in both cases. If I attempt to install it from CPAN, it says that it is already installed.


On Tue, Mar 18, 2014 at 12:13 PM, Andreas Mock <andreas.mock@web.de> wrote:

Have you loaded Apache2::RequestRec?

 

Best regards

Andreas Mock

 

 

Von: John Dunlap [mailto:john@lariat.co]
Gesendet: Dienstag, 18. März 2014 16:59
An: mod_perl list
Betreff: Custom response problem

 

I recently upgraded my workstation from Debian 6 to Debian 7 and I'm now encountering a problem that I haven't seen before. My apache version is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing that I have an installation problem of some kind but I'm not sure where to look for problems. My application works correctly until I attempt to define a custom response, as follows,

 

sub handler {

            my $apache = shift; 

            $apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, 'hi mom');

            return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;

}

 

I see a 500 error, which is what I want, when I access the page. However the error page is the default apache 500 error response page and I want to override it. When I look in the logs, I see this:

 

[Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can't locate object method "custom_response" via package "Apache2::RequestRec" at /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm line 41.

 

This would imply, at least to me, that this method is not compiled into mod_perl or perhaps into apache itself but I cannot be sure. Any suggestions?

 

Cheers!

John

 




-- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a company registered in England with number 2742969, whose registered office is 215 Euston Road, London, NW1 2BE.
--------------020708020005050604030200-- From modperl-return-63587-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Tue Mar 18 16:25:51 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AE8BC104FA for ; Tue, 18 Mar 2014 16:25:51 +0000 (UTC) Received: (qmail 2105 invoked by uid 500); 18 Mar 2014 16:25:46 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 2004 invoked by uid 500); 18 Mar 2014 16:25:42 -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 1930 invoked by uid 99); 18 Mar 2014 16:25:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:25:39 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [212.227.15.4] (HELO mout.web.de) (212.227.15.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:25:32 +0000 Received: from augsburg2 ([80.81.14.43]) by smtp.web.de (mrweb102) with ESMTPSA (Nemesis) id 0Lpezi-1X5Jmy3w7K-00fOhy for ; Tue, 18 Mar 2014 17:25:11 +0100 From: "Andreas Mock" To: "'mod_perl list'" References: <00af01cf42c4$f8a79830$e9f6c890$@web.de> In-Reply-To: Subject: AW: Custom response problem Date: Tue, 18 Mar 2014 17:25:04 +0100 Message-ID: <00c501cf42c6$9f271450$dd753cf0$@web.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00C6_01CF42CF.00EB7C50" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJpIqMSJI4/oL23TaAIyzT+s9q++AKX3/3nAYVVQISZkl4RQA== Content-Language: de X-Provags-ID: V03:K0:XkqtmlYI/N/WBRS29xOJdiR/8b+6dBa6++qEQ5zERo8G5h0vHU0 ve7LODxzNmp2SSF6hzUbikjsRRRcvYQYqTxXVFy0jNH0HUfHmwoUZh16igIauy4KrpT/PHC PMWNxmNmJj1kgUh+ySY37oYJmekCUkh2JeNo3WIZIb203RcnU7USOPdaAzPhHk7/L88w93L ISw+SZOEf2dmJeYXPmLOw== X-Virus-Checked: Checked by ClamAV on apache.org This is a multipart message in MIME format. ------=_NextPart_000_00C6_01CF42CF.00EB7C50 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable What does this give to you? =20 perl -MApache2::RequestRec -e'print Apache2::RequestRec->VERSION' =20 =20 Regards Andreas =20 =20 Von: John Dunlap [mailto:john@lariat.co]=20 Gesendet: Dienstag, 18. M=E4rz 2014 17:16 An: Andreas Mock Cc: mod_perl list Betreff: Re: Custom response problem =20 I've tried it with "use Apache2::RequestRec;" at the top of my handler = and without it. The outcome is the same in both cases. If I attempt to = install it from CPAN, it says that it is already installed. =20 On Tue, Mar 18, 2014 at 12:13 PM, Andreas Mock = wrote: Have you loaded Apache2::RequestRec? =20 Best regards Andreas Mock =20 =20 Von: John Dunlap [mailto:john@lariat.co]=20 Gesendet: Dienstag, 18. M=E4rz 2014 16:59 An: mod_perl list Betreff: Custom response problem =20 I recently upgraded my workstation from Debian 6 to Debian 7 and I'm now encountering a problem that I haven't seen before. My apache version is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing that I = have an installation problem of some kind but I'm not sure where to look for problems. My application works correctly until I attempt to define a = custom response, as follows, =20 sub handler { my $apache =3D shift;=20 =20 $apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, 'hi mom'); return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR; } =20 I see a 500 error, which is what I want, when I access the page. However = the error page is the default apache 500 error response page and I want to override it. When I look in the logs, I see this: =20 [Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can't locate = object method "custom_response" via package "Apache2::RequestRec" at /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm line 41. =20 This would imply, at least to me, that this method is not compiled into mod_perl or perhaps into apache itself but I cannot be sure. Any suggestions? =20 Cheers! John =20 =20 ------=_NextPart_000_00C6_01CF42CF.00EB7C50 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

What = does this give to you?

 

perl -MApache2::RequestRec -e'print = Apache2::RequestRec->VERSION'

 

 

Regards

Andreas

 

 

Von:<= /b> = John Dunlap [mailto:john@lariat.co]
Gesendet: Dienstag, 18. = M=E4rz 2014 17:16
An: Andreas Mock
Cc: mod_perl = list
Betreff: Re: Custom response = problem

 

I've = tried it with "use Apache2::RequestRec;" at the top of my = handler and without it. The outcome is the same in both cases. If I = attempt to install it from CPAN, it says that it is already = installed.

 

On Tue, Mar 18, 2014 at 12:13 PM, Andreas Mock <andreas.mock@web.de> = wrote:

Have = you loaded Apache2::RequestRec?

 

Best = regards

Andreas Mock

 

 

Von:<= /b> = John Dunlap [mailto:john@lariat.co]
Gesendet: Dienstag, 18. = M=E4rz 2014 16:59
An: mod_perl list
Betreff: Custom = response problem

 <= /o:p>

I recently = upgraded my workstation from Debian 6 to Debian 7 and I'm now = encountering a problem that I haven't seen before. My apache version = is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing = that I have an installation problem of some kind but I'm not sure = where to look for problems. My application works correctly until I = attempt to define a custom response, as follows,

 <= /o:p>

sub handler = {

  =           my $apache =3D = shift; 

  =           = $apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, = 'hi mom');

  =           return = Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;

}=

 <= /o:p>

I see a 500 = error, which is what I want, when I access the page. However the error = page is the default apache 500 error response page and I want to = override it. When I look in the logs, I see = this:

 <= /o:p>

[Tue Mar 18 = 15:41:32 2014] [error] [client 127.0.0.1] Can't locate object method = "custom_response" via package "Apache2::RequestRec" = at = /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm = line 41.

 <= /o:p>

This would = imply, at least to me, that this method is not compiled into mod_perl or = perhaps into apache itself but I cannot be sure. Any = suggestions?

 <= /o:p>

Cheers!=

John

 <= /o:p>

 

------=_NextPart_000_00C6_01CF42CF.00EB7C50-- From modperl-return-63588-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Tue Mar 18 16:28:31 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BE64110523 for ; Tue, 18 Mar 2014 16:28:31 +0000 (UTC) Received: (qmail 10906 invoked by uid 500); 18 Mar 2014 16:28:30 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 10869 invoked by uid 500); 18 Mar 2014 16:28:29 -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 10861 invoked by uid 99); 18 Mar 2014 16:28:28 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:28:28 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [212.227.15.3] (HELO mout.web.de) (212.227.15.3) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:28:20 +0000 Received: from augsburg2 ([80.81.14.43]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0MYNzx-1WdItz3ab3-00VCT4 for ; Tue, 18 Mar 2014 17:27:59 +0100 From: "Andreas Mock" To: References: <00af01cf42c4$f8a79830$e9f6c890$@web.de> <53287360.2050201@sanger.ac.uk> In-Reply-To: <53287360.2050201@sanger.ac.uk> Subject: AW: Custom response problem Date: Tue, 18 Mar 2014 17:27:53 +0100 Message-ID: <00d801cf42c7$0339f9d0$09aded70$@web.de> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_00D9_01CF42CF.6500ABC0" X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQJpIqMSJI4/oL23TaAIyzT+s9q++AKX3/3nAYVVQIQB7+gY8pmC36nA Content-Language: de X-Provags-ID: V03:K0:ofYOvjoI1ZnXuBtHZnxH1JOVQMLyQFJX12WIuOg7QhGpCzwTPK5 lvgXd/FKBHw0Ds5iNHnHxn/iTKFBYUq5M+Nsu5LPmyl8SkHEvGarR90WRIswMEbUsTQqxhj LA4Tjv8VQGPZlD+VJkuICrP2YIsu0dfBzDMWsr5J+YONz7985EURJn1S8r3ofOrf4G3WJ1M +qtNtebPeAncSZAVS+C0Q== X-Virus-Checked: Checked by ClamAV on apache.org This is a multipart message in MIME format. ------=_NextPart_000_00D9_01CF42CF.6500ABC0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thia is what I meant with "loading". So, I should have been more precise: "using" :-) =20 Andreas =20 =20 Von: James Smith [mailto:js5@sanger.ac.uk]=20 Gesendet: Dienstag, 18. M=E4rz 2014 17:25 An: modperl@perl.apache.org Betreff: Re: Custom response problem =20 Try: use Apache2::Response (); This should add the method to $r (a lot of the Apache2:: modules do this = - Apache2::RequestUtil, Apache2::Upload etc) On 18/03/2014 16:16, John Dunlap wrote:=20 I've tried it with "use Apache2::RequestRec;" at the top of my handler = and without it. The outcome is the same in both cases. If I attempt to = install it from CPAN, it says that it is already installed. =20 On Tue, Mar 18, 2014 at 12:13 PM, Andreas Mock = wrote: Have you loaded Apache2::RequestRec? =20 Best regards Andreas Mock =20 =20 Von: John Dunlap [mailto:john@lariat.co]=20 Gesendet: Dienstag, 18. M=E4rz 2014 16:59 An: mod_perl list Betreff: Custom response problem =20 I recently upgraded my workstation from Debian 6 to Debian 7 and I'm now encountering a problem that I haven't seen before. My apache version is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing that I = have an installation problem of some kind but I'm not sure where to look for problems. My application works correctly until I attempt to define a = custom response, as follows, =20 sub handler { my $apache =3D shift;=20 =20 $apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, 'hi mom'); return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR; } =20 I see a 500 error, which is what I want, when I access the page. However = the error page is the default apache 500 error response page and I want to override it. When I look in the logs, I see this: =20 [Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can't locate = object method "custom_response" via package "Apache2::RequestRec" at /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm line 41. =20 This would imply, at least to me, that this method is not compiled into mod_perl or perhaps into apache itself but I cannot be sure. Any suggestions? =20 Cheers! John =20 =20 -- The Wellcome Trust Sanger Institute is operated by Genome Research Limited, a charity registered in England with number 1021457 and a = company registered in England with number 2742969, whose registered office is = 215 Euston Road, London, NW1 2BE.=20 ------=_NextPart_000_00D9_01CF42CF.6500ABC0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Thia is what I meant with = "loading".

So, I = should have been more precise: "using"=A0 = :-)

 

Andreas

 

 

Von: James Smith [mailto:js5@sanger.ac.uk]
Gesendet: = Dienstag, 18. M=E4rz 2014 17:25
An: = modperl@perl.apache.org
Betreff: Re: Custom response = problem

 


Try:

     use Apache2::Response = ();

This should add the method to $r (a lot of the = Apache2:: modules do this - Apache2::RequestUtil, Apache2::Upload = etc)
On 18/03/2014 16:16, John Dunlap wrote:

I've tried it with "use = Apache2::RequestRec;" at the top of my handler and without it. The = outcome is the same in both cases. If I attempt to install it from CPAN, = it says that it is already installed.

 

On Tue, Mar 18, 2014 at 12:13 PM, Andreas Mock <andreas.mock@web.de> = wrote:

Have you loaded = Apache2::RequestRec?

 

Best regards

Andreas Mock

 

 

Von:<= /b> = John Dunlap [mailto:john@lariat.co]
Gesendet: Dienstag, 18. = M=E4rz 2014 16:59
An: mod_perl list
Betreff: Custom = response problem

 <= /o:p>

I recently = upgraded my workstation from Debian 6 to Debian 7 and I'm now = encountering a problem that I haven't seen before. My apache version = is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing = that I have an installation problem of some kind but I'm not sure = where to look for problems. My application works correctly until I = attempt to define a custom response, as follows,

 <= /o:p>

sub handler = {

  =           my $apache =3D = shift; 

  =           = $apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, = 'hi mom');

  =           return = Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;

}=

 <= /o:p>

I see a 500 = error, which is what I want, when I access the page. However the error = page is the default apache 500 error response page and I want to = override it. When I look in the logs, I see = this:

 <= /o:p>

[Tue Mar 18 = 15:41:32 2014] [error] [client 127.0.0.1] Can't locate object method = "custom_response" via package "Apache2::RequestRec" = at = /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm = line 41.

 <= /o:p>

This would = imply, at least to me, that this method is not compiled into mod_perl or = perhaps into apache itself but I cannot be sure. Any = suggestions?

 <= /o:p>

Cheers!=

John

 <= /o:p>

 



-- The Wellcome Trust Sanger Institute is = operated by Genome Research Limited, a charity registered in England = with number 1021457 and a company registered in England with number = 2742969, whose registered office is 215 Euston Road, London, NW1 2BE. =

------=_NextPart_000_00D9_01CF42CF.6500ABC0-- From modperl-return-63589-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Tue Mar 18 16:30:04 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8013D1052F for ; Tue, 18 Mar 2014 16:30:04 +0000 (UTC) Received: (qmail 14290 invoked by uid 500); 18 Mar 2014 16:30:03 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 14258 invoked by uid 500); 18 Mar 2014 16:30:03 -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 14249 invoked by uid 99); 18 Mar 2014 16:30:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:30:02 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.220.46] (HELO mail-pa0-f46.google.com) (209.85.220.46) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:29:56 +0000 Received: by mail-pa0-f46.google.com with SMTP id kp14so7487511pab.5 for ; Tue, 18 Mar 2014 09:29:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=H5s0C8KVIN/ooqq9msYK0tW4nalIXZPRTYxcYGfC4vE=; b=RTTfrnE//ExEGXnhGbYa22TF1ioIucpVRI2bIQPi4rNZNeFXXMO2mb56m/wIyrSotV ZcwdzUFGDuNRg4RRDExc7Karv1x+gqhBN+JAuf8ln2v+KmQvJ/H3CIIxiN13sSBDXgIN XrTicMns/REG/idVCEjn66rRfQKcQF5oMb5i0NPegWuYwr81/aWxu06zkPokfazsqvqS sNW1CvqifCtPMVX+Ybpw4nh/45EOa4xuVBx3OpJxYtfne709gl5K68TcX2JCRFPpyLKy S5LR5mMsPg7PCRk7ao40hk7Bv9vK48kxacJiJK37w+4fbtfsz0MWShw3PbdmWSZspxKX Q2vA== X-Gm-Message-State: ALoCoQkydKm6CCmiNS9JQMqxk/mCLMypLpqHJ77q8joKW46+wXph3u4rqi5VqSIw4gHHzO4nIBYP MIME-Version: 1.0 X-Received: by 10.66.228.201 with SMTP id sk9mr11992743pac.134.1395160174413; Tue, 18 Mar 2014 09:29:34 -0700 (PDT) Received: by 10.70.67.36 with HTTP; Tue, 18 Mar 2014 09:29:34 -0700 (PDT) In-Reply-To: <00c501cf42c6$9f271450$dd753cf0$@web.de> References: <00af01cf42c4$f8a79830$e9f6c890$@web.de> <00c501cf42c6$9f271450$dd753cf0$@web.de> Date: Tue, 18 Mar 2014 12:29:34 -0400 Message-ID: Subject: Re: Custom response problem From: John Dunlap To: Andreas Mock Cc: mod_perl list Content-Type: multipart/alternative; boundary=047d7b15a1ff99dbb304f4e40ac4 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b15a1ff99dbb304f4e40ac4 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable @Andreas Mock: "2.000007" @James Smith: That worked! Thanks! On Tue, Mar 18, 2014 at 12:25 PM, Andreas Mock wrote: > What does this give to you? > > > > perl -MApache2::RequestRec -e'print Apache2::RequestRec->VERSION' > > > > > > Regards > > Andreas > > > > > > *Von:* John Dunlap [mailto:john@lariat.co] > *Gesendet:* Dienstag, 18. M=E4rz 2014 17:16 > *An:* Andreas Mock > *Cc:* mod_perl list > *Betreff:* Re: Custom response problem > > > > I've tried it with "use Apache2::RequestRec;" at the top of my handler an= d > without it. The outcome is the same in both cases. If I attempt to instal= l > it from CPAN, it says that it is already installed. > > > > On Tue, Mar 18, 2014 at 12:13 PM, Andreas Mock > wrote: > > Have you loaded Apache2::RequestRec? > > > > Best regards > > Andreas Mock > > > > > > *Von:* John Dunlap [mailto:john@lariat.co] > *Gesendet:* Dienstag, 18. M=E4rz 2014 16:59 > *An:* mod_perl list > *Betreff:* Custom response problem > > > > I recently upgraded my workstation from Debian 6 to Debian 7 and I'm now > encountering a problem that I haven't seen before. My apache version > is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing that I > have an installation problem of some kind but I'm not sure where to look > for problems. My application works correctly until I attempt to define a > custom response, as follows, > > > > sub handler { > > my $apache =3D shift; > > > $apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, 'hi > mom'); > > return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR; > > } > > > > I see a 500 error, which is what I want, when I access the page. However > the error page is the default apache 500 error response page and I want t= o > override it. When I look in the logs, I see this: > > > > [Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can't locate object > method "custom_response" via package "Apache2::RequestRec" at > /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm > line 41. > > > > This would imply, at least to me, that this method is not compiled into > mod_perl or perhaps into apache itself but I cannot be sure. Any > suggestions? > > > > Cheers! > > John > > > > > --047d7b15a1ff99dbb304f4e40ac4 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
@Andreas Mock: "2.000007"

@James Smith: That worked! Thanks!
<= br>
On Tue, Mar 18, 2014 at 12:25 PM, Andreas= Mock <andreas.mock@web.de> wrote:

What does this give to you?

=A0

perl -MA= pache2::RequestRec -e'print Apache2::RequestRec->VERSION'=

=A0

=A0

Regards

Andreas

=A0

=A0

Von: John Dunl= ap [mailto:john@lariat.= co]
Gesendet: Dienstag, 18. M=E4rz 2014 17:16
An: Andreas Mock=
Cc: mod_perl list
Betreff: Re: Custom response problem=

<= /u>=A0

I've tried it with "use Apache2::Reque= stRec;" at the top of my handler and without it. The outcome is the sa= me in both cases. If I attempt to install it from CPAN, it says that it is = already installed.

=A0=

On Tue, Mar 18, 2014 at 12:13 PM, An= dreas Mock <and= reas.mock@web.de> wrote:

Have you loaded Apache2::RequestRe= c?

=A0=

Best regards

Andreas Mock

=A0

=A0

Von: John Dunl= ap [mailto:john@lariat.= co]
Gesendet: Dienstag, 18. M=E4rz 2014 16:59
An: mod_perl lis= t
Betreff: Custom response problem

<= div>

=A0

I recently upgraded my workstation from Debian 6 to Debian 7 and I'm n= ow encountering a problem that I haven't seen before. My apache version= is=A02.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing th= at I have an installation problem of=A0some kind but I'm not sure where= to look for problems. My application works correctly until I attempt to de= fine a custom response, as follows,

=A0

sub handler {

= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 my $apache =3D shift;=A0

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 $apache->= custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, 'hi mom'= ;);

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 return = Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;

}

=A0

I see a 500 error, which is what I want, when I= access the page. However the error page is the default apache 500 error re= sponse page and I want to override it. When I look in the logs, I see this:=

=A0

[Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can= 9;t locate object method "custom_response" via package "Apac= he2::RequestRec" at /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/= RS/BootstrapHandler.pm line 41.

=A0

This would imply, at least to me, that this method is not co= mpiled into mod_perl or perhaps into apache itself but I cannot be sure. An= y suggestions?

=A0

Cheers!

J= ohn

=A0

=A0

<= /div>

--047d7b15a1ff99dbb304f4e40ac4-- From modperl-return-63590-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Tue Mar 18 16:34:04 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 29F5E10565 for ; Tue, 18 Mar 2014 16:34:04 +0000 (UTC) Received: (qmail 23551 invoked by uid 500); 18 Mar 2014 16:34:03 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 23526 invoked by uid 500); 18 Mar 2014 16:34:02 -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 23515 invoked by uid 99); 18 Mar 2014 16:34:01 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:34:01 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of adam.prime@utoronto.ca designates 128.100.132.182 as permitted sender) Received: from [128.100.132.182] (HELO bureau82.ns.utoronto.ca) (128.100.132.182) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:33:56 +0000 Received: from [10.1.4.160] (h216-235-10-210.host.egate.net [216.235.10.210]) (authenticated bits=0) by bureau82.ns.utoronto.ca (8.13.8/8.13.8) with ESMTP id s2IGXUPS000969 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 18 Mar 2014 12:33:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=utoronto.ca; s=beta; t=1395160415; bh=Z9uTUUJgSj3f38c+TpGaxIhMWpb45Za7RIlNHBSRjrg=; h=Message-ID:Date:From:MIME-Version:To:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=JhCE9eS2tV6eDsQLzGe1Yy0ugq8XpGDZRPYxDeL99XjHC5qYQLpbb375/Y2PR+8zs Phow746zLAQrjqBmdz10Cl/lGNldrjqhIWwDxUYSs4bxDmJViPj6M5JmcocdIgXRXL O8o78bDjGcc3L69AZufiO959lMrPcQCvJZIlunDU= Message-ID: <5328755A.5030805@utoronto.ca> Date: Tue, 18 Mar 2014 12:33:30 -0400 From: Adam Prime User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: modperl@perl.apache.org Subject: Re: Custom response problem References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I'm pretty sure you should be using Apache2::Const::SERVER_ERROR, not the HTTP_* constants. This could probably be documented better. You should likely be returning that constant instead of the HTTP_* ones as well. Adam On 14-03-18 11:59 AM, John Dunlap wrote: > I recently upgraded my workstation from Debian 6 to Debian 7 and I'm now > encountering a problem that I haven't seen before. My apache version > is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing that I > have an installation problem of some kind but I'm not sure where to look > for problems. My application works correctly until I attempt to define a > custom response, as follows, > > sub handler { > my $apache = shift; > $apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, 'hi > mom'); > return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR; > } > > I see a 500 error, which is what I want, when I access the page. However > the error page is the default apache 500 error response page and I want > to override it. When I look in the logs, I see this: > > [Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can't locate > object method "custom_response" via package "Apache2::RequestRec" at > /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm > line 41. > > This would imply, at least to me, that this method is not compiled into > mod_perl or perhaps into apache itself but I cannot be sure. Any > suggestions? > > Cheers! > John > From modperl-return-63591-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Tue Mar 18 16:43:28 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 714B5105B3 for ; Tue, 18 Mar 2014 16:43:28 +0000 (UTC) Received: (qmail 44838 invoked by uid 500); 18 Mar 2014 16:43:25 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 44785 invoked by uid 500); 18 Mar 2014 16:43:23 -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 44706 invoked by uid 99); 18 Mar 2014 16:43:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:43:16 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [209.85.160.49] (HELO mail-pb0-f49.google.com) (209.85.160.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:43:10 +0000 Received: by mail-pb0-f49.google.com with SMTP id jt11so7484690pbb.22 for ; Tue, 18 Mar 2014 09:42:48 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=HiJWU4o57l7o5TXAzQ8sAw89QdR/01Fl07Gn5yS64ug=; b=X6e1+Eiy7UmJDady4BG13n9WBL0EYt9VbJ44wpSiuiFJZau74441Xc2mifkt+Ud7mc sIkAXTVEysaIywFvvR53uJCV7H+GV/QRJwFlseoigIunOR0fc/fo59NZ+ik9cdXQU3k9 pQ08IxG1PP/71ROVEvvoP3EDObdf8sWENwkadhN/bS0g7u2X46Eq2O5K2aF9xrNC2lz5 YX6OD5zUjCQjdj6qzrG1qU6D8FJm1Z7RZbM/XTrqYkisAbK3jLah1nsB/bV3/92gGBIr qjKTtmHiRwU+cQj49wpN774DFNwf1hRhSYLuR4UCh04yD2/HxHN6Z01QFm9CoTJnmo55 zVEg== X-Gm-Message-State: ALoCoQnEAOT1KwGGn3+xwuvNnduLruXF+QiqfWyh7HLwbiGmPQ0inqq41wlTw578K1kdR4RZrexq MIME-Version: 1.0 X-Received: by 10.68.113.194 with SMTP id ja2mr34217090pbb.30.1395160968694; Tue, 18 Mar 2014 09:42:48 -0700 (PDT) Received: by 10.70.67.36 with HTTP; Tue, 18 Mar 2014 09:42:48 -0700 (PDT) In-Reply-To: <5328755A.5030805@utoronto.ca> References: <5328755A.5030805@utoronto.ca> Date: Tue, 18 Mar 2014 12:42:48 -0400 Message-ID: Subject: Re: Custom response problem From: John Dunlap To: Adam Prime Cc: mod_perl list Content-Type: multipart/alternative; boundary=047d7b6dce40f199e704f4e4395d X-Virus-Checked: Checked by ClamAV on apache.org --047d7b6dce40f199e704f4e4395d Content-Type: text/plain; charset=ISO-8859-1 This is something that could definitely be better documented. I've already been thrown for a loop by them on several occasions. Sadly, you can't just return the numeric status codes(which are clearly documented in the HTTP specifications) because the values of the constants do not match their corresponding HTTP status codes. Things get even more confusing when you realize that there are also multiple constants for many of the HTTP status codes. I actually have a hash in my application that maps numeric HTTP status codes to the correct constants(I hard coded the constant in my example because I wanted to test the error with the simplest possible scenario). Because of this, I actually have a hash in my application that maps numeric HTTP status codes to the correct constants. That way I can just use the numeric codes(which ARE clearly document) while also returning the correct constants, assuming that I've correctly mapped the numeric codes to the correct constants. With that said, how can I be sure that I'm using the correct constants? My existing mappings are as follows: use constant STATUS_MAP => { '100' => HTTP_CONTINUE, '101' => HTTP_SWITCHING_PROTOCOLS, '200' => OK, '201' => HTTP_CREATED, '202' => HTTP_ACCEPTED, '203' => HTTP_NON_AUTHORITATIVE, '204' => HTTP_NO_CONTENT, '205' => HTTP_RESET_CONTENT, '206' => HTTP_PARTIAL_CONTENT, '300' => HTTP_MULTIPLE_CHOICES, '301' => HTTP_MOVED_PERMANENTLY, '302' => HTTP_MOVED_TEMPORARILY, '303' => HTTP_SEE_OTHER, '304' => HTTP_NOT_MODIFIED, '305' => HTTP_USE_PROXY, '307' => HTTP_TEMPORARY_REDIRECT, '400' => HTTP_BAD_REQUEST, '401' => HTTP_UNAUTHORIZED, '402' => HTTP_PAYMENT_REQUIRED, '403' => HTTP_FORBIDDEN, '404' => HTTP_NOT_FOUND, '405' => HTTP_METHOD_NOT_ALLOWED, '406' => HTTP_NOT_ACCEPTABLE, '407' => HTTP_PROXY_AUTHENTICATION_REQUIRED, '408' => 408, '409' => HTTP_CONFLICT, '410' => HTTP_GONE, '411' => HTTP_LENGTH_REQUIRED, '412' => HTTP_PRECONDITION_FAILED, '413' => HTTP_REQUEST_ENTITY_TOO_LARGE, '414' => HTTP_REQUEST_URI_TOO_LARGE, '415' => HTTP_UNSUPPORTED_MEDIA_TYPE, '416' => HTTP_RANGE_NOT_SATISFIABLE, '417' => HTTP_EXPECTATION_FAILED, '500' => HTTP_INTERNAL_SERVER_ERROR, '501' => HTTP_NOT_IMPLEMENTED, '502' => HTTP_BAD_GATEWAY, '503' => HTTP_SERVICE_UNAVAILABLE, '504' => HTTP_GATEWAY_TIME_OUT, '505' => 505 }; On Tue, Mar 18, 2014 at 12:33 PM, Adam Prime wrote: > I'm pretty sure you should be using Apache2::Const::SERVER_ERROR, not the > HTTP_* constants. This could probably be documented better. You should > likely be returning that constant instead of the HTTP_* ones as well. > > Adam > > > On 14-03-18 11:59 AM, John Dunlap wrote: > >> I recently upgraded my workstation from Debian 6 to Debian 7 and I'm now >> encountering a problem that I haven't seen before. My apache version >> is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing that I >> have an installation problem of some kind but I'm not sure where to look >> for problems. My application works correctly until I attempt to define a >> custom response, as follows, >> >> sub handler { >> my $apache = shift; >> $apache->custom_response(Apache2::Const::HTTP_INTERNAL_SERVER_ERROR, 'hi >> mom'); >> return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR; >> } >> >> I see a 500 error, which is what I want, when I access the page. However >> the error page is the default apache 500 error response page and I want >> to override it. When I look in the logs, I see this: >> >> [Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can't locate >> object method "custom_response" via package "Apache2::RequestRec" at >> /usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/BootstrapHandler.pm >> line 41. >> >> This would imply, at least to me, that this method is not compiled into >> mod_perl or perhaps into apache itself but I cannot be sure. Any >> suggestions? >> >> Cheers! >> John >> >> > --047d7b6dce40f199e704f4e4395d Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
This is something that could definitely be better document= ed. I've already been thrown for a loop by them on several occasions. S= adly, you can't just return the numeric status codes(which are clearly = documented in the HTTP specifications) because the values of the constants = do not match their corresponding HTTP status codes. Things get even more co= nfusing when you realize that there are also multiple constants for many of= the HTTP status codes.=A0I actually have a hash in my application that map= s numeric HTTP status codes to the correct constants(I hard coded the const= ant in my example because I wanted to test the error with the simplest poss= ible scenario). Because of this, I actually have a hash in my application t= hat maps numeric HTTP status codes to the correct constants. That way I can= just use the numeric codes(which ARE clearly document) while also returnin= g the correct constants, assuming that I've correctly mapped the numeri= c codes to the correct constants.

With that said, how can I be sure that I'm using the cor= rect constants? My existing mappings are as follows:
use con= stant STATUS_MAP =3D> {=A0
'100' =3D> HTTP_CONTINUE,
'101' =3D&g= t; HTTP_SWITCHING_PROTOCOLS,
'200' =3D> OK,
'201' =3D> HTTP_CREATED,
'202' =3D&g= t; HTTP_ACCEPTED,
'203' =3D> HTTP_NON_AUTHORITATIVE,
'204' =3D> HTTP_NO_CONTENT,<= /div>
'205' =3D&g= t; HTTP_RESET_CONTENT,
'206' =3D> HTTP_PARTIAL_CONTENT,
'300' =3D> HTTP_MULTIPLE= _CHOICES,
'301' =3D&g= t; HTTP_MOVED_PERMANENTLY,
'302' =3D> HTTP_MOVED_TEMPORARILY,
'303' =3D> HTTP_SEE= _OTHER,
'304' =3D&g= t; HTTP_NOT_MODIFIED,
= '305' =3D> HTTP_USE_PROXY,
'307' =3D> HTTP_TEMPORARY_REDIRE= CT,
'400' =3D&g= t; HTTP_BAD_REQUEST,
= '401' =3D> HTTP_UNAUTHORIZED,
'402' =3D> HTTP_PAYMENT_REQUIR= ED,
'403' =3D&g= t; HTTP_FORBIDDEN,
'404' =3D> HTTP_NOT_FOUND,
'405' =3D> HTTP_METHOD_NOT_ALLOWED,=
'406' =3D&g= t; HTTP_NOT_ACCEPTABLE,
'407' =3D> HTTP_PROXY_AUTHENTICATION_REQUIRED,
'408' =3D>= 408,
'409' =3D&g= t; HTTP_CONFLICT,
'410' =3D> HTTP_GONE,
'411' =3D> HTTP_LENGTH_REQUIRED,
'412' =3D&g= t; HTTP_PRECONDITION_FAILED,
'413' =3D> HTTP_REQUEST_ENTITY_TOO_LARGE,
'414' =3D>= HTTP_REQUEST_URI_TOO_LARGE,
'415' =3D&g= t; HTTP_UNSUPPORTED_MEDIA_TYPE,
'416' =3D> HTTP_RANGE_NOT_SATISFIABLE,
'417' =3D>= HTTP_EXPECTATION_FAILED,
'500' =3D&g= t; HTTP_INTERNAL_SERVER_ERROR,
'501' =3D> HTTP_NOT_IMPLEMENTED,
'502' =3D> HTTP_B= AD_GATEWAY,
'503' =3D&g= t; HTTP_SERVICE_UNAVAILABLE,
'504' =3D> HTTP_GATEWAY_TIME_OUT,
'505' =3D> 505
};





On Tue, Mar 18, 20= 14 at 12:33 PM, Adam Prime <adam.prime@utoronto.ca> wro= te:
I'm pretty sure you should be using Apac= he2::Const::SERVER_ERROR, not the HTTP_* constants. This could probably be = documented better. You should likely be returning that constant instead of = the HTTP_* ones as well.

Adam


On 14-03-18 11:59 AM, John Dunlap wrote:
I recently upgraded my workstation from Debian 6 to Debian 7 and I'm no= w
encountering a problem that I haven't seen before. My apache version is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm guessing that = I
have an installation problem of some kind but I'm not sure where to loo= k
for problems. My application works correctly until I attempt to define a custom response, as follows,

sub handler {
my $apache =3D shift;
$apache->custom_response(Apache2::Const::HTTP_INTERNAL_SER= VER_ERROR, 'hi
mom');
return Apache2::Const::HTTP_INTERNAL_SERVER_ERROR;
}

I see a 500 error, which is what I want, when I access the page. However the error page is the default apache 500 error response page and I want
to override it. When I look in the logs, I see this:

[Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can't locate
object method "custom_response" via package "Apache2::Reques= tRec" at
/usr/local/lariat-trunk/qa-trunk/lib/Lariat/V4/WS/RS/Bootstra= pHandler.pm
line 41.

This would imply, at least to me, that this method is not compiled into
mod_perl or perhaps into apache itself but I cannot be sure. Any
suggestions?

Cheers!
John



--047d7b6dce40f199e704f4e4395d-- From modperl-return-63592-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Tue Mar 18 16:50:33 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3010E105F1 for ; Tue, 18 Mar 2014 16:50:33 +0000 (UTC) Received: (qmail 61963 invoked by uid 500); 18 Mar 2014 16:50:31 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 60945 invoked by uid 500); 18 Mar 2014 16:50:29 -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 60920 invoked by uid 99); 18 Mar 2014 16:50:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:50:26 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of adam.prime@utoronto.ca designates 128.100.132.185 as permitted sender) Received: from [128.100.132.185] (HELO bureau85.ns.utoronto.ca) (128.100.132.185) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Mar 2014 16:50:20 +0000 Received: from [10.1.4.160] (h216-235-10-210.host.egate.net [216.235.10.210]) (authenticated bits=0) by bureau85.ns.utoronto.ca (8.13.8/8.13.8) with ESMTP id s2IGngQ0018679 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 18 Mar 2014 12:49:56 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=utoronto.ca; s=beta; t=1395161397; bh=cirSJTuP16syyISWbnHUIX6WWhDviIrGrzHStWPyV40=; h=Message-ID:Date:From:MIME-Version:To:CC:Subject:References: In-Reply-To:Content-Type:Content-Transfer-Encoding; b=TNE+F7KOCa/IWdU7WOYyJgAcFePdasbJUt1PFHw5H31ETkQlKDj5dzgjIM7thJgCf 1dzecCgbyIkiycsnmjQMGHoa6dtajfP+f+AMVI1PViClJtJc95Zof5qDtKJoOFOlGA aKiXEA45wRjGvqElfPjZeEyLNXtWI+Y67jN+X+BI= Message-ID: <53287926.8040808@utoronto.ca> Date: Tue, 18 Mar 2014 12:49:42 -0400 From: Adam Prime User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: John Dunlap CC: mod_perl list Subject: Re: Custom response problem References: <5328755A.5030805@utoronto.ca> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I rarely use anything outside of Apache2::Const qw/:common/ :common Apache2::Const::AUTH_REQUIRED Apache2::Const::DECLINED Apache2::Const::DONE Apache2::Const::FORBIDDEN Apache2::Const::NOT_FOUND Apache2::Const::OK Apache2::Const::REDIRECT Apache2::Const::SERVER_ERROR from http://perl.apache.org/docs/2.0/api/Apache2/Const.html The main exception to that for me is using HTTP_MOVED_PERMANENTLY for 301's. These constants are all imported from httpd, which is why they might differ from the actual HTTP status code from the HTTP spec. Adam On 14-03-18 12:42 PM, John Dunlap wrote: > This is something that could definitely be better documented. I've > already been thrown for a loop by them on several occasions. Sadly, you > can't just return the numeric status codes(which are clearly documented > in the HTTP specifications) because the values of the constants do not > match their corresponding HTTP status codes. Things get even more > confusing when you realize that there are also multiple constants for > many of the HTTP status codes. I actually have a hash in my application > that maps numeric HTTP status codes to the correct constants(I hard > coded the constant in my example because I wanted to test the error with > the simplest possible scenario). Because of this, I actually have a hash > in my application that maps numeric HTTP status codes to the correct > constants. That way I can just use the numeric codes(which ARE clearly > document) while also returning the correct constants, assuming that I've > correctly mapped the numeric codes to the correct constants. > > With that said, how can I be sure that I'm using the correct constants? > My existing mappings are as follows: > use constant STATUS_MAP => { > '100' => HTTP_CONTINUE, > '101' => HTTP_SWITCHING_PROTOCOLS, > '200' => OK, > '201' => HTTP_CREATED, > '202' => HTTP_ACCEPTED, > '203' => HTTP_NON_AUTHORITATIVE, > '204' => HTTP_NO_CONTENT, > '205' => HTTP_RESET_CONTENT, > '206' => HTTP_PARTIAL_CONTENT, > '300' => HTTP_MULTIPLE_CHOICES, > '301' => HTTP_MOVED_PERMANENTLY, > '302' => HTTP_MOVED_TEMPORARILY, > '303' => HTTP_SEE_OTHER, > '304' => HTTP_NOT_MODIFIED, > '305' => HTTP_USE_PROXY, > '307' => HTTP_TEMPORARY_REDIRECT, > '400' => HTTP_BAD_REQUEST, > '401' => HTTP_UNAUTHORIZED, > '402' => HTTP_PAYMENT_REQUIRED, > '403' => HTTP_FORBIDDEN, > '404' => HTTP_NOT_FOUND, > '405' => HTTP_METHOD_NOT_ALLOWED, > '406' => HTTP_NOT_ACCEPTABLE, > '407' => HTTP_PROXY_AUTHENTICATION_REQUIRED, > '408' => 408, > '409' => HTTP_CONFLICT, > '410' => HTTP_GONE, > '411' => HTTP_LENGTH_REQUIRED, > '412' => HTTP_PRECONDITION_FAILED, > '413' => HTTP_REQUEST_ENTITY_TOO_LARGE, > '414' => HTTP_REQUEST_URI_TOO_LARGE, > '415' => HTTP_UNSUPPORTED_MEDIA_TYPE, > '416' => HTTP_RANGE_NOT_SATISFIABLE, > '417' => HTTP_EXPECTATION_FAILED, > '500' => HTTP_INTERNAL_SERVER_ERROR, > '501' => HTTP_NOT_IMPLEMENTED, > '502' => HTTP_BAD_GATEWAY, > '503' => HTTP_SERVICE_UNAVAILABLE, > '504' => HTTP_GATEWAY_TIME_OUT, > '505' => 505 > }; > > > > > > On Tue, Mar 18, 2014 at 12:33 PM, Adam Prime > wrote: > > I'm pretty sure you should be using Apache2::Const::SERVER_ERROR, > not the HTTP_* constants. This could probably be documented better. > You should likely be returning that constant instead of the HTTP_* > ones as well. > > Adam > > > On 14-03-18 11:59 AM, John Dunlap wrote: > > I recently upgraded my workstation from Debian 6 to Debian 7 and > I'm now > encountering a problem that I haven't seen before. My apache version > is 2.2.22-13+deb7u1. My mod_perl version is 2.0.7-3. I'm > guessing that I > have an installation problem of some kind but I'm not sure where > to look > for problems. My application works correctly until I attempt to > define a > custom response, as follows, > > sub handler { > my $apache = shift; > $apache->custom_response(__Apache2::Const::HTTP_INTERNAL___SERVER_ERROR, > 'hi > mom'); > return Apache2::Const::HTTP_INTERNAL___SERVER_ERROR; > } > > I see a 500 error, which is what I want, when I access the page. > However > the error page is the default apache 500 error response page and > I want > to override it. When I look in the logs, I see this: > > [Tue Mar 18 15:41:32 2014] [error] [client 127.0.0.1] Can't locate > object method "custom_response" via package "Apache2::RequestRec" at > /usr/local/lariat-trunk/qa-__trunk/lib/Lariat/V4/WS/RS/__BootstrapHandler.pm > line 41. > > This would imply, at least to me, that this method is not > compiled into > mod_perl or perhaps into apache itself but I cannot be sure. Any > suggestions? > > Cheers! > John > > > From modperl-return-63593-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Fri Mar 21 14:49:49 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2FD7610C6C for ; Fri, 21 Mar 2014 14:49:49 +0000 (UTC) Received: (qmail 39039 invoked by uid 500); 21 Mar 2014 14:49:42 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 38961 invoked by uid 500); 21 Mar 2014 14:49:35 -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 38953 invoked by uid 99); 21 Mar 2014 14:49:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Mar 2014 14:49:34 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paulburton0@gmail.com designates 209.85.216.169 as permitted sender) Received: from [209.85.216.169] (HELO mail-qc0-f169.google.com) (209.85.216.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Mar 2014 14:49:27 +0000 Received: by mail-qc0-f169.google.com with SMTP id i17so2903122qcy.0 for ; Fri, 21 Mar 2014 07:49:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:openpgp :content-type:content-transfer-encoding; bh=okP0v5K9PG4+mH4jLRc3B4QamqlIC3ohE3USmWDcfzQ=; b=Nhlm6cPhI0gV5sGqjfqXi66Eo/+3UT4aUJfU6LTUl931fQCpv9wBcnLzovbwGFsTvI DsFSoQGv2jzfK1lwBR8QHTsw+cxJMfQCy8VnFdcdHxZZVdhuUGm/UQyZK2cCu9Au7U7p W/LmFkif1jcVPgBJ07tqPD6/snLPAMSHInT4uPAvI1zMaMNiY1ojaTc43H6PbO7afCMJ WTTx1xFYPT3GSUcpXr/XaKmrTYnLfmj8ICn5laowogCc6+fphSqE1BaD2GN13rr1/aYy y1A1VmOIDGpqbzO5rxJJRXHzAUX6AClNkzd8guQ87sa2j3lalb3XTJcf+Hu0AUuWM17/ EZwA== X-Received: by 10.140.101.244 with SMTP id u107mr2523178qge.107.1395413345605; Fri, 21 Mar 2014 07:49:05 -0700 (PDT) Received: from [0.0.0.0] (c-73-177-129-109.hsd1.va.comcast.net. [73.177.129.109]) by mx.google.com with ESMTPSA id z10sm9684954qaf.33.2014.03.21.07.49.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Mar 2014 07:49:04 -0700 (PDT) Message-ID: <532C50F9.7050102@gmail.com> Date: Fri, 21 Mar 2014 10:47:21 -0400 From: Paul Burton User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: modperl@perl.apache.org Subject: Segmentation fault when starting Apache 2.2.26 with Perl 5.18.1 and mod_perl 2.0.8 X-Enigmail-Version: 1.6 OpenPGP: id=F8E8848C; url=http://paul-burton.com/keys/publickeys.asc Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org I'm using Slackware 14.1, but since it includes Apache 2.4 (which based on what I've read is no compatible with mod_perl), I removed it and installed the latest Apache 2.2 from source. Once that was done, I confirmed that the basic installation was working (Got the "It works!" page when I loaded localhost:80). I downloaded mod_perl 2.0.8 and made sure all its dependencies were installed (the official docs said to just install Bundle::Apache2 from CPAN). The module installed correctly once I provided the path to apxs in the Apache bin directory. I made sure that mod_perl.so was installed in the modules directory and added "LoadModule perl_module modules/mod_perl.so" to httpd.conf. But here's what happens when I try to start the server (and I did make sure there were no other httpd processes running): root@nas:~# /usr/local/apache2/bin/apachectl start /usr/local/apache2/bin/apachectl: line 78: 28245 Segmentation fault $HTTPD -k $ARGV dmesg contains this message: httpd[28245]: segfault at c ip b702020b sp bf84a000 error 4 in mod_perl.so[b7001000+37000] Here are the details of my configuration: root@nas:~# perl -V Summary of my perl5 (revision 5 version 18 subversion 1) configuration: Platform: osname=linux, osvers=3.10.9-smp, archname=i486-linux-thread-multi uname='linux hive 3.10.9-smp #1 smp wed aug 21 15:27:17 cdt 2013 i686 amd phenom(tm) ii x6 1100t processor authenticamd gnulinux ' config_args='-de -Dprefix=/usr -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl5 -Dsitearch=/usr/local/lib/perl5 -Darchlib=/usr/lib/perl5 -Dvendorprefix=/usr -Dprivlib=/usr/share/perl5 -Dvendorlib=/usr/share/perl5/vendor_perl -Dvendorarch=/usr/lib/perl5/vendor_perl -Dscriptdir=/usr/bin -Dcccdlflags=-fPIC -Dinstallprefix=/usr -Dlibpth=/usr/local/lib /usr/lib /lib -Doptimize=-O2 -march=i486 -mtune=i686 -Dusethreads -Duseithreads -Duseshrplib -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Darchname=i486-linux' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2 -march=i486 -mtune=i686', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include' ccversion='', gccversion='4.8.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='cc', ldflags =' -fstack-protector -L/usr/local/lib' libpth=/usr/local/lib /usr/lib /lib libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.17.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.17' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/CORE' cccdlflags='-fPIC', lddlflags='-shared -O2 -march=i486 -mtune=i686 -L/usr/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: HAS_TIMES MULTIPLICITY PERLIO_LAYERS PERL_DONT_CREATE_GVSV PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_ITHREADS USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF USE_REENTRANT_API Built under linux Compiled at Sep 5 2013 22:01:10 @INC: /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 . root@nas:~# /usr/local/apache2/bin/httpd -V Server version: Apache/2.2.26 (Unix) Server built: Mar 21 2014 08:03:13 Server's Module Magic Number: 20051115:33 Server loaded: APR 1.4.6, APR-Util 1.5.1 Compiled using: APR 1.4.6, APR-Util 1.5.1 Architecture: 32-bit Server MPM: Prefork threaded: no forked: yes (variable process count) Server compiled with.... -D APACHE_MPM_DIR="server/mpm/prefork" -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=128 -D HTTPD_ROOT="/usr/local/apache2" -D SUEXEC_BIN="/usr/local/apache2/bin/suexec" -D DEFAULT_PIDLOG="logs/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_LOCKFILE="logs/accept.lock" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="conf/mime.types" -D SERVER_CONFIG_FILE="conf/httpd.conf" root@nas:~# /usr/local/apache2/bin/httpd -M Loaded Modules: core_module (static) authn_file_module (static) authn_default_module (static) authz_host_module (static) authz_groupfile_module (static) authz_user_module (static) authz_default_module (static) auth_basic_module (static) include_module (static) filter_module (static) log_config_module (static) env_module (static) setenvif_module (static) version_module (static) mpm_prefork_module (static) http_module (static) mime_module (static) status_module (static) autoindex_module (static) asis_module (static) cgi_module (static) negotiation_module (static) dir_module (static) actions_module (static) userdir_module (static) alias_module (static) so_module (static) perl_module (shared) Syntax OK root@nas:~# grep -v '^ *#' /usr/local/apache2/conf/httpd.conf ServerRoot "/usr/local/apache2" Listen 80 LoadModule perl_module modules/mod_perl.so User daemon Group daemon ServerAdmin you@example.com DocumentRoot "/usr/local/apache2/htdocs" Options FollowSymLinks AllowOverride None Order deny,allow Deny from all Options Indexes FollowSymLinks AllowOverride None Order allow,deny Allow from all DirectoryIndex index.html Order allow,deny Deny from all Satisfy All ErrorLog "logs/error_log" LogLevel warn LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %b" common LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio CustomLog "logs/access_log" common ScriptAlias /cgi-bin/ "/usr/local/apache2/cgi-bin/" AllowOverride None Options None Order allow,deny Allow from all DefaultType text/plain TypesConfig conf/mime.types AddType application/x-compress .Z AddType application/x-gzip .gz .tgz SSLRandomSeed startup builtin SSLRandomSeed connect builtin -- Paul Burton paulburton0@gmail.com From modperl-return-63594-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Fri Mar 21 16:17:20 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AACEC10FE5 for ; Fri, 21 Mar 2014 16:17:20 +0000 (UTC) Received: (qmail 96612 invoked by uid 500); 21 Mar 2014 16:17:20 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 95952 invoked by uid 500); 21 Mar 2014 16:17:18 -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 95945 invoked by uid 99); 21 Mar 2014 16:17:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Mar 2014 16:17:16 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [212.227.15.3] (HELO mout.web.de) (212.227.15.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Mar 2014 16:17:10 +0000 Received: from augsburg2 ([80.81.14.43]) by smtp.web.de (mrweb103) with ESMTPSA (Nemesis) id 0Lk8ko-1WyjFa3nSM-00c695 for ; Fri, 21 Mar 2014 17:16:49 +0100 From: "Andreas Mock" To: Subject: Apache2, mod_perl, getting the raw request ody Date: Fri, 21 Mar 2014 17:16:41 +0100 Message-ID: <004501cf4520$f5e04760$e1a0d620$@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: Ac9FIGqj3U7aG5soTpePSrRH5F/6dQ== Content-Language: de X-Provags-ID: V03:K0:WaO1ToyIrfzY3jIMMWqX4PMNSOMJG+3mBFd4yc2AjxRDf+WwxPL 8+p1wZ9c7FMxqcSeNl9mnB813kp2AuxIEuW7rlCXVoz6W/16AEWdMBAlmqTXyaEc5Rwl0uk bhA+oAKqkyNmk/cgvlx+H/y+snWfDhVEyDgjedU8asHF1M6Lheb6xl4oRP2qWBfieHVzYXh 6CnlO4n3lqs6DBU/u5F3g== X-Virus-Checked: Checked by ClamAV on apache.org Hi all, searched around and didn't find an answer. Probably it's complicated or so simple that I don't see it. I'm using mod_perl with the response handler being ModPerl::Registry. I wrapped the call to the function handling the request in an eval block to react on exceptions. Is there a easy way to get (and dump) the raw request body? I digged around the Apache2::-modules but didn't find something appropriate. Best regards Andreas Mock From modperl-return-63595-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Thu Mar 27 01:12:40 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 29512109A4 for ; Thu, 27 Mar 2014 01:12:40 +0000 (UTC) Received: (qmail 21199 invoked by uid 500); 27 Mar 2014 01:12:37 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 21094 invoked by uid 500); 27 Mar 2014 01:12:35 -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 Delivered-To: moderator for modperl@perl.apache.org Received: (qmail 59072 invoked by uid 99); 26 Mar 2014 11:19:01 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of claudiu.vatamaniuc@gmail.com designates 209.85.220.195 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=2G/63J5jy6AslIVKpiWbsmYR/YT4DckLR3vvc7tEu0I=; b=YHeHY8cdE/AHOgZTfK4JW+PRKtDc4357qvveGq4Kwt3U3cC0lvO/vc02+hurDcQdGe aokJw/wZlSInj335IVPrCe0zWrBVop0wNpzq67l+dp2jFpVD8Cxp6kL3U4FBZ0cOm3Wh CN5DHtkNbJSJtuWeSrf/T38wx/VYVDseSbHK/G2DJ6XksZnHLC87bDyHVEB6Kd2wsq8S iXv1OCKDZhrU2xF6zK5yjQh5YuWK2le3RXZ07v3EHZZnFHKh9FvTNWOls4AZWH+iGhGb BnpPD+BkdZwqK0vvmv/jucZGfLV8+bab/HzRkXxUudE58s3Itg4tu2UTCK5ECZtVpnfF caog== MIME-Version: 1.0 X-Received: by 10.52.26.161 with SMTP id m1mr40188853vdg.24.1395832714071; Wed, 26 Mar 2014 04:18:34 -0700 (PDT) Date: Wed, 26 Mar 2014 13:18:34 +0200 Message-ID: Subject: mod_perl ppm package for Perl 5.16 From: =?ISO-8859-2?B?Q2xhdWRpdSBW43TjbeNuaXVj?= To: modperl@perl.apache.org Content-Type: multipart/alternative; boundary=20cf307c9efc16943f04f580a15e X-Virus-Checked: Checked by ClamAV on apache.org --20cf307c9efc16943f04f580a15e Content-Type: text/plain; charset=ISO-8859-1 Hi! Is there any ppm package for Perl 5.16 and Apache 2.2 on windows? mod_perl-2.0.ppd requires Perl 5.8 --20cf307c9efc16943f04f580a15e Content-Type: text/html; charset=ISO-8859-1
Hi!

Is there any ppm package for Perl 5.16 and Apache 2.2 on windows?
mod_perl-2.0.ppd requires Perl 5.8
--20cf307c9efc16943f04f580a15e-- From modperl-return-63596-apmail-perl-modperl-archive=perl.apache.org@perl.apache.org Mon Mar 31 23:18:35 2014 Return-Path: X-Original-To: apmail-perl-modperl-archive@www.apache.org Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 03ED310512 for ; Mon, 31 Mar 2014 23:18:35 +0000 (UTC) Received: (qmail 71743 invoked by uid 500); 31 Mar 2014 23:18:34 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 71654 invoked by uid 500); 31 Mar 2014 23:18:33 -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 71647 invoked by uid 99); 31 Mar 2014 23:18:32 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2014 23:18:32 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of skylos@gmail.com designates 209.85.212.173 as permitted sender) Received: from [209.85.212.173] (HELO mail-wi0-f173.google.com) (209.85.212.173) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 Mar 2014 23:18:26 +0000 Received: by mail-wi0-f173.google.com with SMTP id z2so2431421wiv.12 for ; Mon, 31 Mar 2014 16:18:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=1DYCK0qYFfiDP7HLMo74BQ4VyDS//BTWh+yG+w0gfbg=; b=cgk/+Xy/vHXJgbXwka2JEM3gRELhC9cN08Iv0bVnARxHyGwnPN/9hJoYs41i5U7tkb 7lYEM5lq6APMejdpl0NlHLulZ61a6bqtJBOJAG89MnGwswrpiaMVXOXRB/grrovyxEOW pn6HGIwNEtIPeHwRiKiO0czq+tn3LdOXwN7lQdp298FY+7pk6WRcGsyKt311Wx4yH1ys +F8ZuscbmjtqKrt0leXUoRCpDIuli7LO9rnTQw3IAmXIOsaIun0XhTjoGbvOLpsG6lmh /rqQ1GYveULp1FGZ3n0g4AqbhQVvvwxTBeLutB7x27zJpRGdGSf6k4NAkI0nZn7VbjHo 8P1A== X-Received: by 10.180.98.1 with SMTP id ee1mr15821744wib.10.1396307885647; Mon, 31 Mar 2014 16:18:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.101.198 with HTTP; Mon, 31 Mar 2014 16:17:45 -0700 (PDT) From: Skylos Date: Mon, 31 Mar 2014 19:17:45 -0400 Message-ID: Subject: Apache 2.2 and Authorization Providers under mod_perl To: "modperl@perl.apache.org" Content-Type: multipart/alternative; boundary=f46d041824f8856f8204f5ef43ca X-Virus-Checked: Checked by ClamAV on apache.org --f46d041824f8856f8204f5ef43ca Content-Type: text/plain; charset=ISO-8859-1 Trying to migrate an application to mod_perl under apache 2.2 but my custom auth handlers are blowing up on failure to understand '$r->requires' method. The best I can make of it is that apache 2.2 revamped the auth system requiring the definition of providers (like 'group' allowing the 'Require group xxxx' directive in the config file. It seems then that I need to define my own authentication provider... perl-group? mycustomauth-group, so i can say Require mycustomauthgroup admin Thus get the proper ->requires information during the authorization phase for checking? David PS: I apologize for not being able to derive this answer from my search and browsing of the mailing list archives if the answer is in there. I found some that seemed exactly related to this issue under topic mp 2.0.3 make test fails against httpd trunk: Has authorisation changed since httpd 2.2 ? but was unable to find anything about actually defining these authorization providers... -- Dog approved this message. --f46d041824f8856f8204f5ef43ca Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Trying to migrate an application to mod_perl under apache = 2.2 but my custom auth handlers are blowing up on failure to understand = 9;$r->requires' method. =A0The best I can make of it is that apache = 2.2 revamped the auth system requiring the definition of providers (like &#= 39;group' allowing the 'Require group xxxx' directive in the co= nfig file.

It seems then that I need to define my own authentication pr= ovider... perl-group? =A0mycustomauth-group, so i can say

Require mycustomauthgroup admin

Thus get t= he proper ->requires information during the authorization phase for chec= king?

David

PS: I apologize for not = being able to derive this answer from my search and browsing of the mailing= list archives if the answer is in there. =A0I found some that seemed exact= ly related to this issue under topic=A0mp 2.0.3 make test fai= ls against httpd trunk: Has authorisation changed since httpd 2.2 ?= =A0but was unable to find anything about actually defining these authorizat= ion providers...

--
Dog approved this message.=


--f46d041824f8856f8204f5ef43ca--