fix case with no request params

This commit is contained in:
fjy 2014-04-06 12:43:40 -07:00
parent f0e9d6fd83
commit 40c14c9a3c
1 changed files with 5 additions and 0 deletions

View File

@ -239,6 +239,11 @@ public class AsyncQueryForwardingServlet extends HttpServlet
private String makeUrl(String host, HttpServletRequest req)
{
String queryString = req.getQueryString();
if (queryString == null) {
return String.format("http://%s%s", host, req.getRequestURI());
}
return String.format("http://%s%s?%s", host, req.getRequestURI(), req.getQueryString());
}
}