You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/07/17 10:38:53 UTC
[Bug 61311] New: Invalid Exception-catching flow
https://bz.apache.org/bugzilla/show_bug.cgi?id=61311
Bug ID: 61311
Summary: Invalid Exception-catching flow
Product: Tomcat 8
Version: 8.5.13
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: Catalina
Assignee: dev@tomcat.apache.org
Reporter: bartoszarciemowicz@gmail.com
Target Milestone: ----
Request.java, lines 2876-2895:
After catching e.g. SizeException and setting the reason to POST_TOO_LARGE, in
the following finally-block the reason is set to UNKNOWN.
So, the only reason that is ever set up is UNKNOWN.
The problem is with the if-statement in finally-block.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 61311] Invalid Exception-catching flow
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61311
Remy Maucherat <re...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
OS| |All
--- Comment #1 from Remy Maucherat <re...@apache.org> ---
I agree the algorithm looks weird.
Probably something like: if (!success && !parameters.isParseFailed()) would do
what's needed there, and set UNKNOWN only if no reason was set before.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 61311] Invalid Exception-catching flow
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=61311
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #2 from Mark Thomas <ma...@apache.org> ---
It looks weird but it is correct. The implementation of setParseFailedReason()
only updates the reason if no reason is set.
A more efficient finally block is almost certainly possible but the current
code is intended to be robust with respect to changes in the rest of the
method.
I'll add a comment for future reference.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org