Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ protected HttpServerChannel bind(InetSocketAddress socketAddress) throws Excepti
.runOn(sharedGroup.getLowLevelGroup())
.bindAddress(() -> socketAddress)
.compress(true)
.http2Settings(spec -> spec.maxHeaderListSize(maxHeaderSize.bytesAsInt()))
.httpRequestDecoder(
spec -> spec.maxChunkSize(maxChunkSize.bytesAsInt())
.h2cMaxContentLength(h2cMaxContentLength.bytesAsInt())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.io.UncheckedIOException;
import java.net.InetSocketAddress;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
Expand Down Expand Up @@ -56,6 +57,8 @@
import reactor.netty.http.Http2SslContextSpec;
import reactor.netty.http.HttpProtocol;
import reactor.netty.http.client.HttpClient;
import reactor.netty.http.client.PrematureCloseException;
import reactor.util.retry.Retry;

import static io.netty.handler.codec.http.HttpHeaderNames.HOST;
import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1;
Expand Down Expand Up @@ -255,6 +258,7 @@ private FullHttpResponse sendRequestStream(
)
)
)
.retryWhen(Retry.backoff(3, Duration.ofSeconds(1)).filter(throwable -> throwable instanceof PrematureCloseException))
.blockLast();

} finally {
Expand Down Expand Up @@ -283,7 +287,7 @@ private HttpClient createClient(final InetSocketAddress remoteAddress, final Nio
.configure(s -> s.clientAuth(ClientAuth.NONE).trustManager(InsecureTrustManagerFactory.INSTANCE))
: Http2SslContextSpec.forClient()
.configure(s -> s.clientAuth(ClientAuth.NONE).trustManager(InsecureTrustManagerFactory.INSTANCE))
)
).handshakeTimeout(Duration.ofSeconds(30))
);
} else {
return client.protocol(
Expand Down
Loading