Skip to content

Commit

Permalink
Disable request URI normalization by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Apr 15, 2019
1 parent 15a5f42 commit ac09709
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
Expand Up @@ -229,6 +229,7 @@ public RequestConfig createRequestConfig(final int timeout) {
// Sets the timeout in milliseconds used when retrieving a connection from the ClientConnectionManager
.setConnectionRequestTimeout(preferences.getInteger("http.manager.timeout"))
.setSocketTimeout(timeout)
.setNormalizeUri(preferences.getBoolean("http.request.uri.normalize"))
.build();
}

Expand Down
Expand Up @@ -611,6 +611,7 @@ Current default browser view is outline view (0-List view, 1-Outline view, 2-Col
this.setDefault("http.manager.timeout", String.valueOf(0)); // Infinite
this.setDefault("http.socket.buffer", String.valueOf(8192));
this.setDefault("http.credentials.charset", "ISO-8859-1");
this.setDefault("http.request.uri.normalize", String.valueOf(false));

/*
Enable or disable verification that the remote host taking part
Expand Down
4 changes: 0 additions & 4 deletions s3/src/main/java/ch/cyberduck/core/s3/S3Session.java
Expand Up @@ -65,7 +65,6 @@
import ch.cyberduck.core.threading.CancelCallback;

import org.apache.commons.lang3.StringUtils;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.HttpClientBuilder;
import org.apache.log4j.Logger;
Expand Down Expand Up @@ -199,9 +198,6 @@ protected Jets3tProperties configure() {
@Override
public RequestEntityRestStorageService connect(final Proxy proxy, final HostKeyCallback hostkey, final LoginCallback prompt) {
final HttpClientBuilder configuration = builder.build(proxy, this, prompt);
configuration.setDefaultRequestConfig(
RequestConfig.copy(builder.createRequestConfig(preferences.getInteger("connection.timeout.seconds") * 1000)).
setNormalizeUri(false).build());
// Only for AWS
if(S3Session.isAwsHostname(host.getHostname())) {
configuration.setServiceUnavailableRetryStrategy(new S3TokenExpiredResponseInterceptor(this, prompt));
Expand Down

0 comments on commit ac09709

Please sign in to comment.