tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <ma...@apache.org>
Subject Re: svn commit: r1157810 - in /tomcat/trunk: java/org/apache/catalina/core/StandardContextValve.java java/org/apache/catalina/core/StandardHostValve.java test/org/apache/catalina/core/TestStandardContextValve.java
Date Thu, 01 Sep 2011 18:11:05 GMT
On 01/09/2011 19:05, Konstantin Kolinko wrote:
> 2011/9/1 Mark Thomas <markt@apache.org>:
>> On 15/08/2011 13:29, markt@apache.org wrote:
>>> Author: markt
>>> Date: Mon Aug 15 12:29:58 2011
>>> New Revision: 1157810
>>>
>>> URL: http://svn.apache.org/viewvc?rev=1157810&view=rev
>>> Log:
>>> Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=51653
>>> Move custom error handling from Host to Context.
>>
>> This was a bad idea. The authenticators are processed before the
>> StandardContextValve so this broke custom error pages for 401s etc.
>>
>> I'll take another look at this. My current thinking is that firing
>> request listeners should move to the Host with the error handling but I
>> need to see what that looks like.
>>
> 
> I think you have seen this as well:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=51550#c9
> though I do not know whether custom error handling can work for the
> situation in BZ 51550. (I think it can't)

Yep. That is what got me started down this road.

Moving everything to the host does enable this to be handled. We could
add a try/catch around the call to the context and handle any exceptions
as a 500 error which would then pick up the context's custom error handling.

I have a patch to move the error handling and the request listeners to
the host that passes the unit tests. I'll be looking at 51550 tomorrow.

Cheers,

Mark

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


Mime
View raw message