diff --git a/pom.xml b/pom.xml index f532af7..86c7dc8 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.gcube.data.transfer uri-resolver - 1.2.0-SNAPSHOT + 1.3.0-SNAPSHOT war diff --git a/src/main/java/org/gcube/datatransfer/resolver/http/HttpResolver.java b/src/main/java/org/gcube/datatransfer/resolver/http/HttpResolver.java index bead527..440ed3a 100644 --- a/src/main/java/org/gcube/datatransfer/resolver/http/HttpResolver.java +++ b/src/main/java/org/gcube/datatransfer/resolver/http/HttpResolver.java @@ -84,16 +84,24 @@ public class HttpResolver extends HttpServlet { //we should not unescape the filename with spaces + logger.debug("uri = "+uri); + int index= uri.indexOf("?"); if ( index!= -1) { + logger.debug("Found char ?"); 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 + logger.debug("firsPart not chagend: "+firsPart); + logger.debug("replacing in smp-uri char space with char + ..."); + secondPart = secondPart.replace(" ","+");//the char + is removed when the servlet is doing unescaping of the query paramenters, we just put it back + logger.debug("new secondPart: "+secondPart); 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 - + else { + logger.debug("Not found char ?"); + 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); InputStream in = null;