Skip to content

Commit 394cfb6

Browse files
author
Hans-Peter Klett
committed
Updated the Java client to escape the url.
The apache http client does not encode its url when making a request. This actually results in protocol violations when the path name contains spaces.
1 parent a81e1b9 commit 394cfb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sdk/src/main/java/com/spectralogic/ds3client/NetworkClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ private HttpRequest buildHttpRequest() throws IOException {
137137
}
138138

139139
private String buildPath() {
140-
String path = this.ds3Request.getPath();
140+
String path = UrlEscapers.urlFragmentEscaper().escape(this.ds3Request.getPath());
141141
final Map<String, String> queryParams = this.ds3Request.getQueryParams();
142142
if (!queryParams.isEmpty()) {
143143
path += "?" + NetUtils.buildQueryString(queryParams);

0 commit comments

Comments
 (0)