This commit is contained in:
Greg Wilkins 2017-04-20 14:32:54 +10:00
parent 02276974a8
commit 6bb8f793a3
2 changed files with 2 additions and 1 deletions

View File

@ -1765,6 +1765,7 @@ public class Request implements HttpServletRequest
if (encoded==null) if (encoded==null)
{ {
path = uri.isAbsolute()?"/":null; path = uri.isAbsolute()?"/":null;
uri.setPath(path);
} }
else if (encoded.startsWith("/")) else if (encoded.startsWith("/"))
{ {

View File

@ -217,7 +217,7 @@ public class WebAppContextTest
server.start(); server.start();
try try
{ {
String response = connector.getResponses("GET http://localhost:8080 HTTP/1.1\r\nHost: localhost:8080\r\nConnection: close\r\n\r\n"); String response = connector.getResponse("GET http://localhost:8080 HTTP/1.1\r\nHost: localhost:8080\r\nConnection: close\r\n\r\n");
Assert.assertTrue(response.indexOf("200 OK")>=0); Assert.assertTrue(response.indexOf("200 OK")>=0);
} }
finally finally