You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bart van der Schans <sc...@hippo.nl> on 2006/04/03 15:05:58 UTC

Mod_proxy_http ProxyErrorOverride eating cookies

Hi,

The "ProxyErrorOverride On" setting is correctly catching the errors
from the (reverse) proxied server. Only, it overrides too much IMHO.
Right now it overrides anything that's not in the 2xx range, but I think
it should allow also the 3xx range for redirects etc.

A commonly used "trick" is to set a cookie with a 302 header so the
browser gets redirected to the page which "needs" the cookie. When using
ProxyErrorOverride, mod_proxy_http sets its own headers and the cookie
is lost.

The attached patch check not only for ap_is_HTTP_SUCCESS but also for
ap_is_HTTP_REDIRECT which should solve the problem.

Thanks,
Bart van der Schans

-- 

Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466
-------------------------------------------------------------
schans@hippo.nl / http://www.hippo.nl
--------------------------------------------------------------

Re: Mod_proxy_http ProxyErrorOverride eating cookies

Posted by Bart van der Schans <sc...@hippo.nl>.
Nick Kew wrote:
> On Monday 24 April 2006 11:24, Bart van der Schans wrote:
>> Hi all,
>>
>> I'm quite new to the list, so I'm just wondering how it works. Jeff
>> Tharp and I created a bug report and proposed a patch to fix it:
>>
>> http://issues.apache.org/bugzilla/show_bug.cgi?id=39245
>>
>> To me it's seems to be a quite trivial patch for something that is just
>> working incorrectly. It looks like "nothing is happening"  :(  It neither
>> accepted nor denied..
> 
> To break back-compatibility as suggested there would be wrong.
I don't think anything will "break". Mod_proxy_http silently removes
some lines from the header. Right now it doesn't work as advertised.

> But what you suggest makes sense if we make it a configuration
> option, maybe by updating the ProxyErrorOverride directive to
> enable options to treat redirects either as errors or non-errors.
This sound a little weird to me. ProxyErrorOverride should not override
non-errors or it should have a different name like
ProxyErrorAndRedirectAndInfoOverride.

We could add an option ProxyRedirectOverride. I can't think of a
situation where you would want this though..

Bart


-- 

Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466
-------------------------------------------------------------
schans@hippo.nl / http://www.hippo.nl
--------------------------------------------------------------

Re: Mod_proxy_http ProxyErrorOverride eating cookies

Posted by Nick Kew <ni...@webthing.com>.
On Monday 24 April 2006 11:24, Bart van der Schans wrote:
> Hi all,
>
> I'm quite new to the list, so I'm just wondering how it works. Jeff
> Tharp and I created a bug report and proposed a patch to fix it:
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=39245
>
> To me it's seems to be a quite trivial patch for something that is just
> working incorrectly. It looks like "nothing is happening"  :(  It neither
> accepted nor denied..

To break back-compatibility as suggested there would be wrong.
But what you suggest makes sense if we make it a configuration
option, maybe by updating the ProxyErrorOverride directive to
enable options to treat redirects either as errors or non-errors.

-- 
Nick Kew

Re: Mod_proxy_http ProxyErrorOverride eating cookies

Posted by Bart van der Schans <sc...@hippo.nl>.
Hi all,

I'm quite new to the list, so I'm just wondering how it works. Jeff
Tharp and I created a bug report and proposed a patch to fix it:

http://issues.apache.org/bugzilla/show_bug.cgi?id=39245

To me it's seems to be a quite trivial patch for something that is just
working incorrectly. It looks like "nothing is happening"  :(  It neither
accepted nor denied..

If I need to do something to get this fixed in the 2.2 branch I would be
glad to help.

TIA,

Bart

-- 

Hippo
Oosteinde 11
1017WT Amsterdam
The Netherlands
Tel  +31 (0)20 5224466
-------------------------------------------------------------
schans@hippo.nl / http://www.hippo.nl
--------------------------------------------------------------