[wildfly-dev] getRequestURI returns welcome file instead of original request
arjan.tijms at gmail.com
Fri Jun 6 12:11:42 EDT 2014
I noticed there's a difference in behaviour between JBossWeb/Tomcat and
Undertow with respect to welcome files.
Given a request to / and a welcome file set to /index
JBossWeb wil return "/" when HttpServletRequest#getRequestURI is called,
and "/index" when HttpServletRequest#getServletPath is called.
Undertow will return "/index" in both cases.
It's clear what happens by looking at ServletInitialHandler#handleRequest
which does a full rewrite for welcome files:
The Servlet spec (10.10) does seem to justify this somewhat by saying the
"The container may send the request to the welcome resource with a forward,
a redirect, or a container specific mechanism that is indistinguishable
from a direct request."
However, the JavaDoc for HttpServletRequest#getRequestURI doesn't seem to
At any length, it's a nasty difference that breaks various things.
Wonder what the general opinion is about this. Was it a conscious decision
to do a full rewrite in Undertow, or was it something that slipped through?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the wildfly-dev