Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: ModPerl

[MP2]: strange behavior with Apache2::SubRequest::run

 

 

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded


titetluc at gmail

Sep 18, 2008, 7:31 AM

Post #1 of 6 (827 views)
Permalink
[MP2]: strange behavior with Apache2::SubRequest::run

Hello all,

I have 2 URIs returning HTTP_MOVED_TEMPORARILY
The first one, /test_mod_perl is written using mod_perl
The second one, /test_mod_cgi is written using CGI

I call each of these URIs using a Apache2::SubRequest object

my $subr1 = $r->lookup_uri('/test_mod_perl');
my $rc1 = $subr1->run(); ==========> $rc1 = 302
my $status1 = $subr1->status(); ==========> $status1 = 200

my $subr2 = $r->lookup_uri('/test_mod_cgi');
my $rc2 = $subr2->run(); ==========> $rc1 = 0
my $status2 = $subr2->status(); ==========> $status1 = 302

Why this behavior ? Why are there differences between the 2 URIs ?
IMHO, the second behavior is the correct one.

What is your opinion ???

Thanks


perrin at elem

Sep 18, 2008, 10:38 AM

Post #2 of 6 (787 views)
Permalink
Re: [MP2]: strange behavior with Apache2::SubRequest::run [In reply to]

On Thu, Sep 18, 2008 at 10:31 AM, titetluc titetluc <titetluc [at] gmail> wrote:
> I have 2 URIs returning HTTP_MOVED_TEMPORARILY
> The first one, /test_mod_perl is written using mod_perl
> The second one, /test_mod_cgi is written using CGI

Does your mod_perl one return Apache2::Const::REDIRECT at the end?

- Perrin


titetluc at gmail

Sep 19, 2008, 12:29 AM

Post #3 of 6 (776 views)
Permalink
Re: [MP2]: strange behavior with Apache2::SubRequest::run [In reply to]

2008/9/18 Perrin Harkins <perrin [at] elem>

> On Thu, Sep 18, 2008 at 10:31 AM, titetluc titetluc <titetluc [at] gmail>
> wrote:
> > I have 2 URIs returning HTTP_MOVED_TEMPORARILY
> > The first one, /test_mod_perl is written using mod_perl
> > The second one, /test_mod_cgi is written using CGI
>
> Does your mod_perl one return Apache2::Const::REDIRECT at the end?
>


No, the module returns Apache2::Const::MOVED_TEMPORARILY, setting the
Location header by using $r->err_headers_out


> - Perrin


torsten.foertsch at gmx

Sep 19, 2008, 12:36 AM

Post #4 of 6 (773 views)
Permalink
Re: [MP2]: strange behavior with Apache2::SubRequest::run [In reply to]

On Fri 19 Sep 2008, titetluc titetluc wrote:
> > Does your mod_perl one return Apache2::Const::REDIRECT at the end?
>
> No, the module returns Apache2::Const::MOVED_TEMPORARILY, setting the
> Location header by using $r->err_headers_out

$ perl -MApache2::Const=REDIRECT,HTTP_MOVED_TEMPORARILY -le 'print
REDIRECT; print HTTP_MOVED_TEMPORARILY'
302
302

Guess what that means.

Torsten

--
Need professional mod_perl support?
Just hire me: torsten.foertsch [at] gmx


titetluc at gmail

Sep 21, 2008, 11:59 PM

Post #5 of 6 (759 views)
Permalink
Re: [MP2]: strange behavior with Apache2::SubRequest::run [In reply to]

2008/9/19 Torsten Foertsch <torsten.foertsch [at] gmx>

> On Fri 19 Sep 2008, titetluc titetluc wrote:
> > > Does your mod_perl one return Apache2::Const::REDIRECT at the end?
> >
> > No, the module returns Apache2::Const::MOVED_TEMPORARILY, setting the
> > Location header by using $r->err_headers_out
>
> $ perl -MApache2::Const=REDIRECT,HTTP_MOVED_TEMPORARILY -le 'print
> REDIRECT; print HTTP_MOVED_TEMPORARILY'
> 302
> 302
>
> Guess what that means.


That means REDIRECT and HTTP_MOVED_TEMPORARILY are synonyms, but that does
not explain the Apache2::SubRequest::run and $subr->status returned values
!!!! ;-)


>
> Torsten
>
> --
> Need professional mod_perl support?
> Just hire me: torsten.foertsch [at] gmx
>


titetluc at gmail

Sep 25, 2008, 3:37 AM

Post #6 of 6 (742 views)
Permalink
Re: [MP2]: strange behavior with Apache2::SubRequest::run [In reply to]

Does anyone has additional documentation on Apache2::SubRequest::run and
Apache2::SubRequest::status returned values ?

Gaetan

2008/9/22 titetluc titetluc <titetluc [at] gmail>

> 2008/9/19 Torsten Foertsch <torsten.foertsch [at] gmx>
>
>> On Fri 19 Sep 2008, titetluc titetluc wrote:
>> > > Does your mod_perl one return Apache2::Const::REDIRECT at the end?
>> >
>> > No, the module returns Apache2::Const::MOVED_TEMPORARILY, setting the
>> > Location header by using $r->err_headers_out
>>
>> $ perl -MApache2::Const=REDIRECT,HTTP_MOVED_TEMPORARILY -le 'print
>> REDIRECT; print HTTP_MOVED_TEMPORARILY'
>> 302
>> 302
>>
>> Guess what that means.
>
>
> That means REDIRECT and HTTP_MOVED_TEMPORARILY are synonyms, but that does
> not explain the Apache2::SubRequest::run and $subr->status returned values
> !!!! ;-)
>
>
>>
>> Torsten
>>
>> --
>> Need professional mod_perl support?
>> Just hire me: torsten.foertsch [at] gmx
>>
>
>

ModPerl modperl RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.