On 12/23/2015 8:14 PM, Konstantin Kolinko wrote:
2015-12-24 5:22 GMT+03:00 George Sexton <geor...@mhsoftware.com>:
On 12/23/2015 6:59 PM, Konstantin Kolinko wrote:
2015-12-24 4:09 GMT+03:00 George Sexton <geor...@mhsoftware.com>:
I'm seeing an unusual behavior change going from 7.0.65 -> 7.0.67. I've
confirmed this also working under 7.0.55 and not working under 7.0.67 on
a
different machine.
The sequence is:
GET /A.html
POST /A.html <- Returns /A.html
POST /A.html <- Redirects to B.html (tried /B.html and it doesn't work
either)
on 7.0.65, things work as as expected.
on 7.0.67, the final post returns a 404, not found error.
I'm using CATALINA_BASE/CATALINA_HOME and the configuration is not
changed.
Is this change in behavior expected? If the behavior is expected, could
someone elaborate on what I'm doing wrong, and what I should be doing?
How are you sending the redirect? What API are you using?
HttpServletResponse.sendRedirect()
>From tcpdump that 404 response has "Content-Length: 0".
(It is visible from access log as well)
It means that error page handling was not involved, as if the error
was triggered by lower levels of Tomcat.
In the implementation of o.a.c.connector.Response.sendRedirect() [1]
there is try/catch(IllegalArgumentException e) that does fallback to
setStatus(SC_NOT_FOUND);
It may be that it is the cause of 404 status.
The issue is that if the URI is invalid ( e.g. space in a parameter), it
throws an exception. So:
response.sendRedirect("B.html?value=Some Word")
generates a 404 on the page containing the sendRedirect() call, and
there's no message indicating what the true nature of the issue is.
I've filed an ER requesting this be logged.
https://bz.apache.org/bugzilla/show_bug.cgi?id=58768
--
George Sexton
*MH Software, Inc.*
Voice: 303 438 9585
http://www.mhsoftware.com