Re: Fwd: All responses are 200 (server error)

2010-09-27 Thread William A. Rowe Jr.
On 9/28/2010 1:32 AM, Nico Coetzee wrote: > and... it works now !! I'd hit the same bug from CGI some half-decade ago, sorry I didn't see where the problem was in the first place :(

Re: Fwd: All responses are 200 (server error)

2010-09-27 Thread Nico Coetzee
and... it works now !! On Tue, Sep 28, 2010 at 8:30 AM, Nico Coetzee wrote: > $r->status("400"); > $r->status_line("400 Error Baby"); > > Produces: "HTTP/1.1 400 Error Baby" > > And > > $r->status("207"); > $r->status_line("207 Multi-Status"); > > Produces: "HTTP/1.1 207 Multi-Status" > > So,

Re: Fwd: All responses are 200 (server error)

2010-09-27 Thread Nico Coetzee
$r->status("400"); $r->status_line("400 Error Baby"); Produces: "HTTP/1.1 400 Error Baby" And $r->status("207"); $r->status_line("207 Multi-Status"); Produces: "HTTP/1.1 207 Multi-Status" So, I recon I will try this now in the main app. Thanks :-) On Tue, Sep 28, 2010 at 8:26 AM, William A

Re: Fwd: All responses are 200 (server error)

2010-09-27 Thread William A. Rowe Jr.
On 9/28/2010 12:25 AM, Nico Coetzee wrote: > The status 400 (with $r->status_line) produces the same result "HTTP/1.1 200 > OK" and with > ($r->status) is creates a "HTTP/1.1 400 Bad Request" (the custom string gets > lost) > > The $r->status with a code of 499 produces a "HTTP/1.1 400 Bad Reque

Re: Fwd: All responses are 200 (server error)

2010-09-27 Thread Nico Coetzee
The status 400 (with $r->status_line) produces the same result "HTTP/1.1 200 OK" and with ($r->status) is creates a "HTTP/1.1 400 Bad Request" (the custom string gets lost) The $r->status with a code of 499 produces a "HTTP/1.1 400 Bad Request" On Tue, Sep 28, 2010 at 6:31 AM, William A. Rowe J

Re: Fwd: All responses are 200 (server error)

2010-09-27 Thread William A. Rowe Jr.
Two thoughts... try status 400 (might be special handling for 4xx unknown) try r->status instead of/in addition to just r->status_line?

Fwd: All responses are 200 (server error)

2010-09-27 Thread Nico Coetzee
Oops - seems I didn't include the group on my reply FYI Here is another test I did (simpler) Apache Config PerlModule FNBC::test_statusline PerlWarn On SetHandler perl-script PerlResponseHandler FNBC::test_statusline

Re: Apache::Template / Apache::Request

2010-09-27 Thread Perrin Harkins
Hi Chris, On Mon, Sep 27, 2010 at 9:41 AM, Chris Ray wrote: > Hello, I'm having issues installing Apache::Request which has been asked for > when I tried to build Apache::Template. My recommendation at this point would be to stop using Apache::Template. It's not maintained anymore, and I don't

Re: Apache::Template / Apache::Request

2010-09-27 Thread Vincent Veyron
Le lundi 27 septembre 2010 à 14:41 +0100, Chris Ray a écrit : > > > I initially wasn't sure what like in the configure script I should > have been editing but if you pass the location of apxs2 as follows > that error goes away: > > > > ./configure --with-apache2-apxs=/usr/bin/apxs2 It's not

Re: Using a handler other than 'handler'

2010-09-27 Thread Michael Peters
On 09/27/2010 05:17 AM, Cédric Bertolini wrote: PerlAuthenHandler Authen::special doesn't work. It worked in mod_perl 1, but mod_perl 2 complains that it can't find Authen/special.pm in @INC. That's not what he suggested. He said: PerlAuthenHandler Authen->special Tr

Apache::Template / Apache::Request

2010-09-27 Thread Chris Ray
Hello, I'm having issues installing Apache::Request which has been asked for when I tried to build Apache::Template. See below: ch...@debian:~/Apache-Template-2.00_01$ perl Makefile.PL Warning: prerequisite Apache2::Request 0 not found. Writing Makefile for Apache::Template When I try to

Re: All responses are 200 (server error)

2010-09-27 Thread Peter Janovsky
Are you returning the value of 200 within a module you've written? I encountered a similar issue within a C module specific to valid requests. It was resolved by returning the internal constant OK. On Sep 27, 2010, at 5:27, Nico Coetzee wrote: > Hi - don't know if anybody else have come ac

All responses are 200 (server error)

2010-09-27 Thread Nico Coetzee
Hi - don't know if anybody else have come across this. I have a mod_perl instance that produces output just as it should (checked in the logs and I even written the output to file just to have an extra check). The tcpdump also show everything is ok. BUT The content has the following HTML append

Re: Using a handler other than 'handler'

2010-09-27 Thread Cédric Bertolini
@John Thanks for the reply, but PerlAuthenHandler Authen::special doesn't work. It worked in mod_perl 1, but mod_perl 2 complains that it can't find Authen/special.pm in @INC. @André, Thanks for the reply. I was reluctant to use this solution because of the OOC orientation of this syntax, but

Re: Using a handler other than 'handler'

2010-09-27 Thread André Warnier
Hi. You can use PerlAuthenhandler Your::Module->special See http://perl.apache.org/docs/2.0/user/coding/coding.html#Techniques Cédric Bertolini wrote: @Michel, Thanks for the reply. As far as I know, Apache2::RequestRec is a module that provides several functions to manage the $request obj

Re: Using a handler other than 'handler'

2010-09-27 Thread Cédric Bertolini
@Michel, Thanks for the reply. As far as I know, Apache2::RequestRec is a module that provides several functions to manage the $request object provided by mod_perl (http://perl.apache.org/docs/2.0/api/Apache2/RequestRec.html). It's not really a handler, though most handlers use this module one way

Using a handler other than 'handler'

2010-09-27 Thread Cédric Bertolini
Hello, I apologize for such a trivial question, but I'd like to use a function other than "handler" as a perl handler. According to the doc, it was possible in mod_perl 1, but I can't manage to get it to work under mod_perl 2. Here is an example of my code: file Authen.pm > sub handler { > /