You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by "Philip M. Gollucci" <pg...@p6m7g8.com> on 2005/09/12 09:26:39 UTC

httpd 2.3.01 and t/modules/proxy.t

Hi All,

t/modules/proxy.t works in 2.0.54, but doesn't in 2.3.01 (aka svn)
I'm wondering is this a bug in httpd, or did they just change something we haven't caught up with yet?

What happens is:
requested: http://localhost:8536/TestModules__proxy
"proxied to": http://localhost:8536/TestModules__proxy_real


But if I directly request
http://localhost:8536/TestModules__proxy_real

that works just fine.

make test TEST_FILES="t/modules/proxy.t"
t/modules/proxy....request has failed (the response code was: 404)
see t/logs/error_log for more details
t/modules/proxy....dubious
         Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED test 1
         Failed 1/1 tests, 0.00% okay
Failed Test       Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/modules/proxy.t  255 65280     1    2 200.00%  1
Failed 1/1 test scripts, 0.00% okay. 1/1 subtests failed, 0.00% okay.
[warning] server localhost:8529 shutdown
[  error] error running tests (please examine t/logs/error_log)
+--------------------------------------------------------+
| Please file a bug report: http://perl.apache.org/bugs/ |
+--------------------------------------------------------+
*** Error code 1

Stop in /usr/home/pgollucci/dev/repos/asf/perl/modperl/trunk.
pgollucci@pgollucci.internal.liquidation.com /home/pgollucci/dev/repos/asf/perl/modperl/trunk rv=1 359 >cat 
t/logs/error_log
END in modperl_extra.pl, pid=18232
[Mon Sep 12 03:04:11 2005] [notice] Digest: generating secret for digest authentication ...
[Mon Sep 12 03:04:11 2005] [notice] Digest: done
[Mon Sep 12 03:04:11 2005] [debug] proxy_util.c(1634): proxy: initialized single connection worker 0 in child 18250 for 
(localhost)
[Mon Sep 12 03:04:11 2005] [debug] proxy_util.c(1634): proxy: initialized single connection worker 1 in child 18250 for (*)
[Mon Sep 12 03:04:11 2005] [notice] Apache/2.3.0-dev (Unix) world domination series/2.0 DAV/2 mod_perl/2.0.2-dev 
Perl/v5.8.7 configured -- resuming normal operations
[Mon Sep 12 03:04:11 2005] [info] Server built: Sep  9 2005 06:40:20
[Mon Sep 12 03:04:11 2005] [debug] prefork.c(991): AcceptMutex: flock (default: flock)
[Mon Sep 12 03:04:13 2005] [debug] mod_proxy_http.c(54): proxy: HTTP: canonicalising URL 
//localhost:8537/TestModules__proxy_real
[Mon Sep 12 03:04:13 2005] [error] [client 127.0.0.1] File does not exist: 
proxy:http://localhost:8537/TestModules__proxy_real
[Mon Sep 12 03:04:13 2005] [info] Child process pid=18250 is exiting
[Mon Sep 12 03:04:13 2005] [info] Child process pid=18250 is exiting - server push
END in modperl_extra.pl, pid=18250
[Mon Sep 12 03:04:13 2005] [info] Child process pid=18251 is exiting
[Mon Sep 12 03:04:13 2005] [info] Child process pid=18251 is exiting - server push
END in modperl_extra.pl, pid=18251
[Mon Sep 12 03:04:13 2005] [info] removed PID file /usr/home/pgollucci/dev/repos/asf/perl/modperl/trunk/t/logs/httpd.pid 
(pid=18241)
[Mon Sep 12 03:04:13 2005] [notice] caught SIGTERM, shutting down
END in modperl_extra.pl, pid=18241

-- 
END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: httpd 2.3.01 and t/modules/proxy.t

Posted by Joe Orton <jo...@redhat.com>.
On Fri, Sep 23, 2005 at 04:51:17AM -0400, Philip M. Gollucci wrote:
> Joe Orton wrote:
> >On Mon, Sep 12, 2005 at 03:42:28AM -0400, Philip M. Gollucci wrote:
> >
> >>Philip M. Gollucci wrote:
> >>
> >>>What happens is:
> >>>requested: http://localhost:8536/TestModules__proxy
> >>>"proxied to": http://localhost:8536/TestModules__proxy_real
> >>>
> >>>
> >>>But if I directly request
> >>>http://localhost:8536/TestModules__proxy_real
> >>
> >>Assume 8536 == 8537 .. sorry for the typo
> >
> >
> >This was discussed a while back.  I don't think it makes sense for 
> >mod_perl to set r->proxyreq to anything other than PROXYREQ_REVERSE; 
> >this fixes the failure, Geoff may disagree still though ;)
>
> Is it worth conditionalizing it as its only an issue in 2.3.01+ AFAIK ?

Well really it's either correct for all versions or it's not correct at 
all - pick one ;)

joe

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: httpd 2.3.01 and t/modules/proxy.t

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Joe Orton wrote:
> On Mon, Sep 12, 2005 at 03:42:28AM -0400, Philip M. Gollucci wrote:
> 
>>Philip M. Gollucci wrote:
>>
>>>What happens is:
>>>requested: http://localhost:8536/TestModules__proxy
>>>"proxied to": http://localhost:8536/TestModules__proxy_real
>>>
>>>
>>>But if I directly request
>>>http://localhost:8536/TestModules__proxy_real
>>
>>Assume 8536 == 8537 .. sorry for the typo
> 
> 
> This was discussed a while back.  I don't think it makes sense for 
> mod_perl to set r->proxyreq to anything other than PROXYREQ_REVERSE; 
> this fixes the failure, Geoff may disagree still though ;)
Is it worth conditionalizing it as its only an issue in 2.3.01+ AFAIK ?

-- 
END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: maintainer mode (was Re: httpd 2.3.01 and t/modules/proxy.t)

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Joe Orton wrote:
> On Wed, Sep 28, 2005 at 11:08:58AM -0400, Geoffrey Young wrote:
> 
>>Philip M. Gollucci wrote:
>>
>>>2.0.47 bus core dumps when you attempt to run it despite compiling under
>>>maintainer mode.
>>>I believe this is your same core dump mentioned above.
>>
>>yeah, sounds like it.  mod_perl won't even build for me because httpd -l
>>dumps core
> 
> 
> Yup, this is the specific bug I mentioned.  If using an old version of 
> gcc is not practical you can apply the patches to fix it in APR:
> 
> http://svn.apache.org/viewcvs.cgi?rev=58984&view=rev
> 
> though this somewhat erodes the value of testing against "2.0.47" or 
> whatever.

somewhat, but not entirely.  the things that concern me most are macros,
constants, subroutines, etc that exist only in later versions that somehow
creep into our codebase inadvertently, making it difficult or impossible to
compile or run mod_perl against older versions of httpd.  so, in that sense
getting httpd to compile so we can "test" against it is a good thing.

so, thanks for the link :)

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: maintainer mode (was Re: httpd 2.3.01 and t/modules/proxy.t)

Posted by Joe Orton <jo...@redhat.com>.
On Wed, Sep 28, 2005 at 11:08:58AM -0400, Geoffrey Young wrote:
> Philip M. Gollucci wrote:
> > 2.0.47 bus core dumps when you attempt to run it despite compiling under
> > maintainer mode.
> > I believe this is your same core dump mentioned above.
> 
> yeah, sounds like it.  mod_perl won't even build for me because httpd -l
> dumps core

Yup, this is the specific bug I mentioned.  If using an old version of 
gcc is not practical you can apply the patches to fix it in APR:

http://svn.apache.org/viewcvs.cgi?rev=58984&view=rev

though this somewhat erodes the value of testing against "2.0.47" or 
whatever.

> $ gdb /apache/2.0.47/prefork/perl-5.8.7/bin/httpd
> (gdb) run -l
> ...
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -151487584 (LWP 31636)]
> 0x080785b7 in register_hooks ()
> (gdb) bt
> #0  0x080785b7 in register_hooks ()
> #1  0x080675b0 in ap_setup_prelinked_modules (process=0x92df120) at config.c:645
> #2  0x0806a937 in main (argc=2, argv=0xfef17724) at main.c:439


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: maintainer mode (was Re: httpd 2.3.01 and t/modules/proxy.t)

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Geoffrey Young wrote:
>>While I'm thinking about it, from SOURCE, not ports on FreeBSD,
                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> I don't worry about official releases compiling without errors or under
> maintainer mode - they're already out there, so there's nothing we can do to
> change the compile warnings or errors that exist.
Yeah I figured.

> yeah, sounds like it.  mod_perl won't even build for me because httpd -l
> dumps core
Yep thats the one!

> but no port or rpm system should be building with maintainer flags, right?
ports and packages on FreeBSD do not.  There are however options not on by default to enable them
in ports.  The ports Makefiles are used to build the pacakges, but again, this option is not on for that.



-- 
END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


maintainer mode (was Re: httpd 2.3.01 and t/modules/proxy.t)

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Philip M. Gollucci wrote:
> Geoffrey Young wrote:
> 
>> to that end, this patch seems to do the trick.  tested against 2.0.54 and
>> httpd trunk.  someone else will need to test 2.0.47 since I'm getting odd
>> compile warnings and coredumps in httpd at the moment on fc3
>> (unrelated to
>> mod_perl) for that version.
> 
> 
> While I'm thinking about it, from SOURCE, not ports on FreeBSD,
> 
> 2.0.48 -> 2.0.50 of httpd with threaded apr don't compile on FreeBSD
> undermaintainer mode because or apr_threadmutex.c warnings/errors.

I don't worry about official releases compiling without errors or under
maintainer mode - they're already out there, so there's nothing we can do to
change the compile warnings or errors that exist.

but you're right, I wasn't thinking that the issue could be the extra flags
maintainer mode added.  I was just thinking it was the difference between my
old (pre drive failure) fc1 install where everything was fine and my new
(post new drive) fc3 install.

> 
> 2.0.47 bus core dumps when you attempt to run it despite compiling under
> maintainer mode.
> I believe this is your same core dump mentioned above.

yeah, sounds like it.  mod_perl won't even build for me because httpd -l
dumps core

$ gdb /apache/2.0.47/prefork/perl-5.8.7/bin/httpd
(gdb) run -l
...
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -151487584 (LWP 31636)]
0x080785b7 in register_hooks ()
(gdb) bt
#0  0x080785b7 in register_hooks ()
#1  0x080675b0 in ap_setup_prelinked_modules (process=0x92df120) at config.c:645
#2  0x0806a937 in main (argc=2, argv=0xfef17724) at main.c:439


> 
> so FreeBSD looks like 2.0.51 threaded and 2.0.48 not threaded

but no port or rpm system should be building with maintainer flags, right?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: httpd 2.3.01 and t/modules/proxy.t

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Geoffrey Young wrote:
> to that end, this patch seems to do the trick.  tested against 2.0.54 and
> httpd trunk.  someone else will need to test 2.0.47 since I'm getting odd
> compile warnings and coredumps in httpd at the moment on fc3 (unrelated to
> mod_perl) for that version.

While I'm thinking about it, from SOURCE, not ports on FreeBSD,

2.0.48 -> 2.0.50 of httpd with threaded apr don't compile on FreeBSD undermaintainer mode because or apr_threadmutex.c 
warnings/errors.

2.0.47 bus core dumps when you attempt to run it despite compiling under maintainer mode.
I believe this is your same core dump mentioned above.

so FreeBSD looks like 2.0.51 threaded and 2.0.48 not threaded



-- 
END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: httpd 2.3.01 and t/modules/proxy.t

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> Looks good to me.

committed.

>> tested against 2.0.54 and httpd trunk.  someone else will need to 
>>test 2.0.47 since I'm getting odd compile warnings and coredumps in 
>>httpd at the moment on fc3 (unrelated to mod_perl) for that version.
> 
> 
> Old versions of httpd (<2.0.50?) will do that if compiled with new 
> versions of gcc (>3.3?) - I forget the exact versions; on FC3 try 
> "CC=gcc32 ./configure" and it might work.

well, I tried and httpd compiled ok (thanks!) but mod_perl wouldn't compile.
 I guess if I switch compilers I ought to recompile perl as well anyway.
but thanks for the info - if I figure out how to get it all working I'll post.

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: httpd 2.3.01 and t/modules/proxy.t

Posted by Joe Orton <jo...@redhat.com>.
On Wed, Sep 28, 2005 at 10:38:58AM -0400, Geoffrey Young wrote:
> 
> 
> Joe Orton wrote:
> > 
> 
> ok, joe, thanks for responding.
> 
> I don't know what to take away from all the joint questions, though... guess
> we all need some more (round) tuits :)

I'll second that :)

> > But either 
> > way: setting ->proxyreq = PROXYREQ_REVERSE is the only correct thing to 
> > do for the code in t/response/TestModules/proxy.pm - it enables a 
> > reverse proxy.
> 
> to that end, this patch seems to do the trick.

Looks good to me.

>  tested against 2.0.54 and httpd trunk.  someone else will need to 
> test 2.0.47 since I'm getting odd compile warnings and coredumps in 
> httpd at the moment on fc3 (unrelated to mod_perl) for that version.

Old versions of httpd (<2.0.50?) will do that if compiled with new 
versions of gcc (>3.3?) - I forget the exact versions; on FC3 try 
"CC=gcc32 ./configure" and it might work.

joe

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: httpd 2.3.01 and t/modules/proxy.t

Posted by Geoffrey Young <ge...@modperlcookbook.org>.

Joe Orton wrote:
> 

ok, joe, thanks for responding.

I don't know what to take away from all the joint questions, though... guess
we all need some more (round) tuits :)

> But either 
> way: setting ->proxyreq = PROXYREQ_REVERSE is the only correct thing to 
> do for the code in t/response/TestModules/proxy.pm - it enables a 
> reverse proxy.

to that end, this patch seems to do the trick.  tested against 2.0.54 and
httpd trunk.  someone else will need to test 2.0.47 since I'm getting odd
compile warnings and coredumps in httpd at the moment on fc3 (unrelated to
mod_perl) for that version.

--Geoff

Re: httpd 2.3.01 and t/modules/proxy.t

Posted by Joe Orton <jo...@redhat.com>.
On Fri, Sep 23, 2005 at 10:12:18AM -0400, Geoffrey Young wrote:
> 
> >This was discussed a while back.  I don't think it makes sense for 
> >mod_perl to set r->proxyreq to anything other than PROXYREQ_REVERSE; 
> >this fixes the failure, Geoff may disagree still though ;)
> 
> :)
> 
> ok, in all honesty I get the different types of proxies mixed up - by 
> name, by function, and all.  but this was my point before (I think :)
> 
> a common mod_perl technique since the mod_perl epoch has been to point 
> your browser proxy settings to a server where a PerlTransHandler decides 
> whether to let the request continue to mod_proxy or not.  in mp1-land 
> that involved

This seems reasonable.

>   $r->proxyreq(0);
> 
> >-        retval = r->proxyreq = 1;
> >+        retval = r->proxyreq = PROXYREQ_REVERSE;
> 
> as I said, I get my names mixed up all the time.  is a reverse proxy the 
> same as
> 
>   r->proxyreq = 1;
> 
> was in apache 1.3?  if not, then is this code actually accomplishing the 
> same thing at all?

It's strictly equivalent to 1.3's ->proxyreq = PROXY_PASS.  But either 
way: setting ->proxyreq = PROXYREQ_REVERSE is the only correct thing to 
do for the code in t/response/TestModules/proxy.pm - it enables a 
reverse proxy.

> >     if (val) {
> >-        r->proxyreq = SvIV(val);
> >+        r->proxyreq = SvIV(val) ? PROXYREQ_REVERSE : 0;
> 
> PROXYREQ_NONE here, yes?

s/0/PROXYREQ_NONE/ is more correct, yes.

> anyway, I guess I see two things here.  first, your original assertion 
> that we should only support PROXYREQ_REVERSE isn't entirely true - we 
> support PROXYREQ_NONE as well :)  which I guess speaks to my original 
> concern.  maybe.

It would be quite reasonable to just expose these three constants in the 
mod_perl API and punt on the issue.  I don't have round tuits to relearn 
enough XS to submit a patch for that though ;)

> the next is that while I'm not sure what the other PROXYREQ_* states 
> achieve, is it smart to just set to PROXYREQ_NONE silently when a user 
> attempts to set a different state?  assuming we agree to support just 
> NONE and REVERSE, what about something like
> 
>   if (val) {
>     if (val == PROXYREQ_NONE || val == PROXYREQ_REVERSE) {
>       r->proxyreq = val;
>     }
>     else {
>       warn "your request was ignored..."
>     }
>   }

That would be reasonable.

> finally, it looks like that code will undo the
> 
>   if (!val && !r->proxyreq... ) {
>     ...
>     retval = r->proxyreq = 1;
>   }
> 
> foo above, right?

Actually I'm not at all sure what that big if() statement is supposed to 
do.  It could be an attempt to automatically detect when the server is 
acting as *forward* proxy.  I don't know why that needs to be done in 
mod_perl.  This goes back to the assumption that mod_proxy will behave 
correctly as a forward proxy even when not configured using 
"ProxuRequests on" - which is no longer true in 2.2.

> in truth, this whole function looks wicked messy.  shouldn't all 
> request_rec accessor methods return the 
> current-before-you-messed-with-it value for the structure?  I'm not sure 
> that was ever explicitly spelled out in our mission statement (heh :) 
> but IIRC almost all the record accessors behave that way historically.

No idea about this sorry ;)

joe

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: httpd 2.3.01 and t/modules/proxy.t

Posted by Geoffrey Young <ge...@modperlcookbook.org>.
> This was discussed a while back.  I don't think it makes sense for 
> mod_perl to set r->proxyreq to anything other than PROXYREQ_REVERSE; 
> this fixes the failure, Geoff may disagree still though ;)

:)

ok, in all honesty I get the different types of proxies mixed up - by 
name, by function, and all.  but this was my point before (I think :)

a common mod_perl technique since the mod_perl epoch has been to point 
your browser proxy settings to a server where a PerlTransHandler decides 
whether to let the request continue to mod_proxy or not.  in mp1-land 
that involved

   $r->proxyreq(0);

> -        retval = r->proxyreq = 1;
> +        retval = r->proxyreq = PROXYREQ_REVERSE;

as I said, I get my names mixed up all the time.  is a reverse proxy the 
same as

   r->proxyreq = 1;

was in apache 1.3?  if not, then is this code actually accomplishing the 
same thing at all?

>      if (val) {
> -        r->proxyreq = SvIV(val);
> +        r->proxyreq = SvIV(val) ? PROXYREQ_REVERSE : 0;

PROXYREQ_NONE here, yes?

anyway, I guess I see two things here.  first, your original assertion 
that we should only support PROXYREQ_REVERSE isn't entirely true - we 
support PROXYREQ_NONE as well :)  which I guess speaks to my original 
concern.  maybe.

the next is that while I'm not sure what the other PROXYREQ_* states 
achieve, is it smart to just set to PROXYREQ_NONE silently when a user 
attempts to set a different state?  assuming we agree to support just 
NONE and REVERSE, what about something like

   if (val) {
     if (val == PROXYREQ_NONE || val == PROXYREQ_REVERSE) {
       r->proxyreq = val;
     }
     else {
       warn "your request was ignored..."
     }
   }

finally, it looks like that code will undo the

   if (!val && !r->proxyreq... ) {
     ...
     retval = r->proxyreq = 1;
   }

foo above, right?

in truth, this whole function looks wicked messy.  shouldn't all 
request_rec accessor methods return the 
current-before-you-messed-with-it value for the structure?  I'm not sure 
that was ever explicitly spelled out in our mission statement (heh :) 
but IIRC almost all the record accessors behave that way historically.

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: httpd 2.3.01 and t/modules/proxy.t

Posted by Joe Orton <jo...@redhat.com>.
On Mon, Sep 12, 2005 at 03:42:28AM -0400, Philip M. Gollucci wrote:
> Philip M. Gollucci wrote:
> >What happens is:
> >requested: http://localhost:8536/TestModules__proxy
> >"proxied to": http://localhost:8536/TestModules__proxy_real
> >
> >
> >But if I directly request
> >http://localhost:8536/TestModules__proxy_real
> 
> Assume 8536 == 8537 .. sorry for the typo

This was discussed a while back.  I don't think it makes sense for 
mod_perl to set r->proxyreq to anything other than PROXYREQ_REVERSE; 
this fixes the failure, Geoff may disagree still though ;)

Index: xs/Apache2/RequestRec/Apache2__RequestRec.h
===================================================================
--- xs/Apache2/RequestRec/Apache2__RequestRec.h	(revision 291092)
+++ xs/Apache2/RequestRec/Apache2__RequestRec.h	(working copy)
@@ -58,14 +58,14 @@
                                    r->parsed_uri.port : 
                                    ap_default_port(r))))
     {
-        retval = r->proxyreq = 1;
+        retval = r->proxyreq = PROXYREQ_REVERSE;
         r->uri = r->unparsed_uri;
         /* else mod_proxy will segfault */
         r->filename = apr_pstrcat(r->pool, "modperl-proxy:", r->uri, NULL);
     }
 
     if (val) {
-        r->proxyreq = SvIV(val);
+        r->proxyreq = SvIV(val) ? PROXYREQ_REVERSE : 0;
     }
 
     return retval;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: httpd 2.3.01 and t/modules/proxy.t

Posted by "Philip M. Gollucci" <pg...@p6m7g8.com>.
Philip M. Gollucci wrote:
> What happens is:
> requested: http://localhost:8536/TestModules__proxy
> "proxied to": http://localhost:8536/TestModules__proxy_real
> 
> 
> But if I directly request
> http://localhost:8536/TestModules__proxy_real

Assume 8536 == 8537 .. sorry for the typo

-- 
END
------------------------------------------------------------
     What doesn't kill us can only make us stronger.
                 Nothing is impossible.
				
Philip M. Gollucci (pgollucci@p6m7g8.com) 301.254.5198
Consultant / http://p6m7g8.net/Resume/
Senior Developer / Liquidity Services, Inc.
   http://www.liquidityservicesinc.com
        http://www.liquidation.com
        http://www.uksurplus.com
        http://www.govliquidation.com
        http://www.gowholesale.com


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org