This commit is contained in:
Andrea Manzi 2013-08-02 09:59:24 +00:00
parent 696d0496a4
commit 64db3af25a
1 changed files with 15 additions and 1 deletions

View File

@ -50,6 +50,9 @@ public class HttpResolver extends HttpServlet {
logger.info("The http session id is: " + request.getSession().getId());
logger.debug("Original URI = "+ uri);
uri = request.getParameter("smp-uri");
if (uri == null || uri.equals("")) {
@ -73,8 +76,19 @@ public class HttpResolver extends HttpServlet {
contentType = null;
}
uri = uri.replace(" ","+");//the char + is removed when the servlet is doing unescaping of the query paramenters, we just put it back
//we should not unescape the filename with spaces
int index= uri.indexOf("?");
if ( index!= -1)
{
String firsPart = uri.substring(0, index);
String secondPart= uri.substring( index+1);
secondPart.replace(" ","+");//the char + is removed when the servlet is doing unescaping of the query paramenters, we just put it back
uri= firsPart+"?"+secondPart;
}
else uri = uri.replace(" ","+");//the char + is removed when the servlet is doing unescaping of the query paramenters, we just put it back
logger.debug("URI = "+ uri);
try {