Skip to content

Commit

Permalink
ServletPath is never null but it might be zero length.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1716881 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
markt-asf committed Nov 27, 2015
1 parent 39c521c commit 24c8d8c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions java/org/apache/catalina/servlets/DefaultServlet.java
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,11 @@ protected String getRelativePath(HttpServletRequest request) {
}

StringBuilder result = new StringBuilder();
if (servletPath != null) {
if (servletPath.length() > 0) {
result.append(servletPath);
if (pathInfo != null) {
result.append(pathInfo);
}
}
if (pathInfo != null) {
result.append(pathInfo);
}
if (result.length() == 0) {
result.append('/');
Expand Down

0 comments on commit 24c8d8c

Please # to comment.