Caused by: java.net.URISyntaxException: Illegal character in path at index 103: http://s3.amazonaws.com/some-bucket/some file with space.jar
at java.net.URI$Parser.fail(URI.java:2829)
at java.net.URI$Parser.checkChars(URI.java:3002)
at java.net.URI$Parser.parseHierarchical(URI.java:3086)
at java.net.URI$Parser.parse(URI.java:3034)
at java.net.URI.(URI.java:595)
at org.kuali.maven.wagon.S3Wagon.getNormalizedKey(S3Wagon.java:301)
... 28 more
Simple fix for getNormalizedKey() could be...
URI rawURI = new URI(urlString.replace(" ", "%20"));
Characters that are troublesome for an http URL (spaces, #, @, etc) but are perfectly valid in a file system path no longer cause issues when uploading files to S3.
To correctly download files from S3 that are stored under keys containing characters like these, be sure to properly encode the key portion of the URL (eg using java.net.URLEncoder.encode()) before making the http request.
Caused by: java.net.URISyntaxException: Illegal character in path at index 103: http://s3.amazonaws.com/some-bucket/some file with space.jar at java.net.URI$Parser.fail(URI.java:2829) at java.net.URI$Parser.checkChars(URI.java:3002) at java.net.URI$Parser.parseHierarchical(URI.java:3086) at java.net.URI$Parser.parse(URI.java:3034) at java.net.URI.(URI.java:595)
at org.kuali.maven.wagon.S3Wagon.getNormalizedKey(S3Wagon.java:301)
... 28 more
Simple fix for getNormalizedKey() could be...
URI rawURI = new URI(urlString.replace(" ", "%20"));