Skip to content

Commit

Permalink
Merge pull request #1063 from baranowb/UNDERTOW-1591
Browse files Browse the repository at this point in the history
[UNDERTOW-1591] Fix AsyncContext.dispatch() to pass decoded path
  • Loading branch information
fl4via authored Mar 30, 2021
2 parents 7cfacd4 + 209c64a commit efd8de0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
import io.undertow.servlet.handlers.ServletDebugPageHandler;
import io.undertow.servlet.handlers.ServletPathMatch;
import io.undertow.servlet.handlers.ServletRequestContext;
import io.undertow.util.CanonicalPathUtils;
import io.undertow.util.Headers;
import io.undertow.util.SameThreadExecutor;
import io.undertow.util.StatusCodes;
Expand Down Expand Up @@ -179,7 +178,8 @@ public void dispatch() {
//this should never happen
throw UndertowServletMessages.MESSAGES.couldNotFindContextToDispatchTo(requestImpl.getOriginalContextPath());
}
String toDispatch = CanonicalPathUtils.canonicalize(requestImpl.getOriginalRequestURI()).substring(requestImpl.getOriginalContextPath().length());
//UNDERTOW-1591 use original, decoded value to dispatch, this should match: ServletInitialHandler.handleRequest
String toDispatch = requestImpl.getExchange().getRelativePath();
String qs = requestImpl.getOriginalQueryString();
if (qs != null && !qs.isEmpty()) {
toDispatch = toDispatch + "?" + qs;
Expand Down

0 comments on commit efd8de0

Please sign in to comment.