Skip to content

Commit

Permalink
Fix issue with incorrect determination of whether or not a string is …
Browse files Browse the repository at this point in the history
…encoded

by replacing URLDecoder with import org.springframework.web.util.UriUtils
as the former does not handle '+' character.

    Ticket: #8356
    Acked-by: Albert Rossi <arossi@fnal.gov>
    Target: trunk
    Request: 2.9
    Request: 2.8
    Request: 2.7
    Request: 2.6
    Require-book: no
    Require-notes: yes

RELEASE NOTES

Fix bug effecting ability to stage files from Enstore if file names
contain '+' character.
(cherry picked from commit d12513c)
  • Loading branch information
DmitryLitvintsev committed Jun 12, 2014
1 parent 2262adb commit 66839ee
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import com.google.common.collect.ImmutableList;
import org.springframework.web.util.UriComponentsBuilder;
import org.springframework.web.util.UriUtils;

import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URLDecoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -117,6 +117,6 @@ public StorageInfo getDirStorageInfo(ExtendedInode inode) throws CacheException
}

private static boolean isEncoded(String s) throws UnsupportedEncodingException {
return !s.equals(URLDecoder.decode(s,"UTF-8"));
return !s.equals(UriUtils.decode(s,"UTF-8"));
}
}

0 comments on commit 66839ee

Please sign in to comment.