Skip to content

Commit

Permalink
Issue jetty#3555 - Applying more changes from review
Browse files Browse the repository at this point in the history
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Apr 17, 2019
1 parent 5ef8a8a commit b0f72a8
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.util.IO;
import org.eclipse.jetty.util.StringUtil;
import org.eclipse.jetty.util.UrlEncoded;
import org.eclipse.jetty.util.log.Log;
import org.eclipse.jetty.util.log.Logger;
import org.eclipse.jetty.util.resource.Resource;
Expand Down Expand Up @@ -148,13 +149,11 @@ public void handle(String target, Request baseRequest, HttpServletRequest reques
// Context Path
ContextHandler context = (ContextHandler)handlers[i];

StringBuilder href = new StringBuilder();

String contextPath = context.getContextPath();
href.append(contextPath);
String href = UrlEncoded.encodeString(contextPath.substring(1), UTF_8);
if (contextPath.length() > 1 && !contextPath.endsWith("/"))
{
href.append("/");
href += '/';
}

if (context.isRunning())
Expand Down

0 comments on commit b0f72a8

Please sign in to comment.