kopia lustrzana https://github.com/gaul/s3proxy
Configure Jetty to use legacy compliance
This prevents changing header value cases which previously caused S3 signature mismatches. Fixes #392. References eclipse/jetty.project#7168.pull/405/head
rodzic
2839107c6f
commit
2e61c38626
|
@ -31,6 +31,8 @@ import com.google.common.base.Splitter;
|
|||
import com.google.common.base.Strings;
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import org.eclipse.jetty.http.HttpCompliance;
|
||||
import org.eclipse.jetty.server.HttpConfiguration;
|
||||
import org.eclipse.jetty.server.HttpConnectionFactory;
|
||||
import org.eclipse.jetty.server.Server;
|
||||
import org.eclipse.jetty.server.ServerConnector;
|
||||
|
@ -51,12 +53,6 @@ public final class S3Proxy {
|
|||
private final boolean listenHTTP;
|
||||
private final boolean listenHTTPS;
|
||||
|
||||
static {
|
||||
// Prevent Jetty from rewriting headers:
|
||||
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=414449
|
||||
System.setProperty("org.eclipse.jetty.http.HttpParser.STRICT", "true");
|
||||
}
|
||||
|
||||
S3Proxy(Builder builder) {
|
||||
checkArgument(builder.endpoint != null ||
|
||||
builder.secureEndpoint != null,
|
||||
|
@ -89,7 +85,8 @@ public final class S3Proxy {
|
|||
}
|
||||
|
||||
HttpConnectionFactory httpConnectionFactory =
|
||||
new HttpConnectionFactory();
|
||||
new HttpConnectionFactory(
|
||||
new HttpConfiguration(), HttpCompliance.LEGACY);
|
||||
ServerConnector connector;
|
||||
if (builder.endpoint != null) {
|
||||
connector = new ServerConnector(server, httpConnectionFactory);
|
||||
|
|
Ładowanie…
Reference in New Issue