Summary: | Decoded Request URI used for Asynchronous dispatch | ||
---|---|---|---|
Product: | Tomcat 7 | Reporter: | cg.throwaway |
Component: | Catalina | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 7.0.53 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | All |
Description
cg.throwaway
2015-02-10 16:02:19 UTC
The specification text you quoted skips over a few things. The main one is how tricky it is to split an undecoded URI into contextPath, servletPath and pathInfo. See the getContextPath() implementation in [1] for an idea of just how messy this could get. I have no desire to see that sort of code in something that is meant to be a convenience method. Elsewhere in the Servlet spec (including for async) dispatches are handled in terms of decoded paths relative to a context root. The convenience dispatch() methods needs to be handled the same way to avoid a whole pile of unnecessary complexity. If you need the original request URI it is available via the usual request attribute. I'll raise this with the Servlet EG to see if the wording of this can be changed/improved but - as far as Tomcat is concerned - this is a WONTFIX. Note if the EG opt for the behavior you are asking for I'll re-open this issue. I've added a test case that confirms the observed behavior. [1] http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Request.java?view=annotate Previous discussion of this issue, ~8 months ago (June 2014): "Decoded URL set on asynchronous request" http://tomcat.markmail.org/thread/e33tqu7ayp2fguh4 (In reply to Konstantin Kolinko from comment #2) > Previous discussion of this issue, ~8 months ago (June 2014): > > "Decoded URL set on asynchronous request" > http://tomcat.markmail.org/thread/e33tqu7ayp2fguh4 Yeah, I did find this discussion but it wasn't very clear what conclusion you guys came to. There was talk of opening a bug but I couldn't find any when I searched so I figured I would open this one. (In reply to Mark Thomas from comment #1) > I'll raise this with the Servlet EG to see if the wording of this can be > changed/improved but - as far as Tomcat is concerned - this is a WONTFIX. > Note if the EG opt for the behavior you are asking for I'll re-open this > issue. Thanks for the detailed reply. I'm still a bit confused about the outcome though... are you saying that this *is* a Tomcat bug but it won't be fixed (hence the WONTFIX resolution), or that it *isn't* a bug because you believe Tomcat's current behaviour is what the servlet spec intended, or something else entirely? I believe - and discussions with the Servlet EG have confirmed that other EG members agree - that Tomcat's behaviour is as the specification intended. I'd normally close bugs like this as invalid but went for won't fix because the intended spec behaviour at the time was unclear. Thread from EG. This time actually add the link. https://java.net/projects/servlet-spec/lists/jsr369-experts/archive/2015-02/message/18 |