tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rossen Stoyanchev <rstoyanc...@pivotal.io>
Subject AsynContext.dispatch() with encoded URI
Date Tue, 13 Jun 2017 20:30:58 GMT
hi,

The spec says:

"If the AsyncContext was initialized via the startAsync(ServletRequest,
ServletResponse) and the request passed is an instance of
HttpServletRequest , then the dispatch is to the URI returned by
HttpServletRequest.getRequestURI()"

However AsyncContextImpl seems to be using the servletPath:
https://github.com/apache/tomcat/blob/9af8708d7ea3817df47f34146a6ff802d96980fa/java/org/apache/catalina/core/AsyncContextImpl.java#L156-L163

So given a URL with an encoded slash (and
UDecoder.ALLOW_ENCODED_SLASH=true):
/foo/vv%2F1234/add/2

The dispatch ends up going to:
/foo/vv/1234/add/2

Is this intentional? It contradicts the spec.

Thanks,
Rossen

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message