fixed bug in HttpResover
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/data-transfer/uri-resolver@112321 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
71a92b3232
commit
c755ecde63
2
pom.xml
2
pom.xml
|
@ -8,7 +8,7 @@
|
||||||
</parent>
|
</parent>
|
||||||
<groupId>org.gcube.data.transfer</groupId>
|
<groupId>org.gcube.data.transfer</groupId>
|
||||||
<artifactId>uri-resolver</artifactId>
|
<artifactId>uri-resolver</artifactId>
|
||||||
<version>1.2.0-SNAPSHOT</version>
|
<version>1.3.0-SNAPSHOT</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -84,16 +84,24 @@ public class HttpResolver extends HttpServlet {
|
||||||
|
|
||||||
//we should not unescape the filename with spaces
|
//we should not unescape the filename with spaces
|
||||||
|
|
||||||
|
logger.debug("uri = "+uri);
|
||||||
|
|
||||||
int index= uri.indexOf("?");
|
int index= uri.indexOf("?");
|
||||||
if ( index!= -1)
|
if ( index!= -1)
|
||||||
{
|
{
|
||||||
|
logger.debug("Found char ?");
|
||||||
String firsPart = uri.substring(0, index);
|
String firsPart = uri.substring(0, index);
|
||||||
String secondPart= uri.substring( index+1);
|
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;
|
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);
|
logger.debug("URI = "+ uri);
|
||||||
InputStream in = null;
|
InputStream in = null;
|
||||||
|
|
Loading…
Reference in New Issue