Skip to content

Commit

Permalink
Fully decode #9444
Browse files Browse the repository at this point in the history
getServletPath and getPathInfo will never return an encoded path segment. Instead, they will throw an IllegalArgumentException if they are called when there is a URI with violations.
  • Loading branch information
gregw committed Mar 7, 2023
1 parent 199a342 commit 47052f6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,8 @@ else if (req instanceof ServletApiRequest apiRequest)
else
pathInContext = URIUtil.addPaths(isPathInfoOnly() ? "/" : req.getServletPath(), req.getPathInfo());

pathInContext = URIUtil.encodePath(pathInContext);

if (LOG.isDebugEnabled())
LOG.debug("doGet(req={}, resp={}) pathInContext={}, included={}", req, resp, pathInContext, included);

Expand Down

0 comments on commit 47052f6

Please sign in to comment.