use of reactor.netty.http.Http2SslContextSpec in project reactor-netty by reactor.
the class HttpServerTests method testIssue1286_ServerHTTP11AndH2ClientH2.
@Test
void testIssue1286_ServerHTTP11AndH2ClientH2() throws Exception {
Http2SslContextSpec serverCtx = Http2SslContextSpec.forServer(ssc.certificate(), ssc.privateKey());
Http2SslContextSpec clientCtx = Http2SslContextSpec.forClient().configure(builder -> builder.trustManager(InsecureTrustManagerFactory.INSTANCE));
doTestIssue1286(server -> server.protocol(HttpProtocol.H2, HttpProtocol.HTTP11).secure(spec -> spec.sslContext(serverCtx)), client -> client.protocol(HttpProtocol.H2).secure(spec -> spec.sslContext(clientCtx)), false, false);
}
use of reactor.netty.http.Http2SslContextSpec in project reactor-netty by reactor.
the class HttpServerTests method testIssue1978H2NoDelay.
/**
* This test verifies if server h2 streams are closed properly when the server does not consume client post data chunks
*/
@ParameterizedTest
@MethodSource("h2CompatibleCombinations")
void testIssue1978H2NoDelay(HttpProtocol[] serverProtocols, HttpProtocol[] clientProtocols) throws Exception {
Http2SslContextSpec serverCtx = Http2SslContextSpec.forServer(ssc.certificate(), ssc.privateKey());
Http2SslContextSpec clientCtx = Http2SslContextSpec.forClient().configure(builder -> builder.trustManager(InsecureTrustManagerFactory.INSTANCE));
doTestIssue1978(serverProtocols, clientProtocols, serverCtx, clientCtx, 0, 0);
}
use of reactor.netty.http.Http2SslContextSpec in project reactor-netty by reactor.
the class HttpServerTests method testIssue1286ConnectionClose_ServerHTTP11AndH2ClientH2.
@Test
void testIssue1286ConnectionClose_ServerHTTP11AndH2ClientH2() throws Exception {
Http2SslContextSpec serverCtx = Http2SslContextSpec.forServer(ssc.certificate(), ssc.privateKey());
Http2SslContextSpec clientCtx = Http2SslContextSpec.forClient().configure(builder -> builder.trustManager(InsecureTrustManagerFactory.INSTANCE));
doTestIssue1286(server -> server.protocol(HttpProtocol.H2, HttpProtocol.HTTP11).secure(spec -> spec.sslContext(serverCtx)), client -> client.protocol(HttpProtocol.H2).secure(spec -> spec.sslContext(clientCtx)), true, false);
}
use of reactor.netty.http.Http2SslContextSpec in project reactor-netty by reactor.
the class HttpServerTests method testIssue1286ConnectionCloseErrorResponse_ServerHTTP11AndH2ClientHTTP11AndH2.
@Test
void testIssue1286ConnectionCloseErrorResponse_ServerHTTP11AndH2ClientHTTP11AndH2() throws Exception {
Http2SslContextSpec serverCtx = Http2SslContextSpec.forServer(ssc.certificate(), ssc.privateKey());
Http2SslContextSpec clientCtx = Http2SslContextSpec.forClient().configure(builder -> builder.trustManager(InsecureTrustManagerFactory.INSTANCE));
doTestIssue1286(server -> server.protocol(HttpProtocol.H2, HttpProtocol.HTTP11).secure(spec -> spec.sslContext(serverCtx)), client -> client.protocol(HttpProtocol.H2, HttpProtocol.HTTP11).secure(spec -> spec.sslContext(clientCtx)), true, true);
}
use of reactor.netty.http.Http2SslContextSpec in project reactor-netty by reactor.
the class HttpServerTests method testIssue1286ConnectionClose_ServerHTTP11AndH2ClientHTTP11AndH2.
@Test
void testIssue1286ConnectionClose_ServerHTTP11AndH2ClientHTTP11AndH2() throws Exception {
Http2SslContextSpec serverCtx = Http2SslContextSpec.forServer(ssc.certificate(), ssc.privateKey());
Http2SslContextSpec clientCtx = Http2SslContextSpec.forClient().configure(builder -> builder.trustManager(InsecureTrustManagerFactory.INSTANCE));
doTestIssue1286(server -> server.protocol(HttpProtocol.H2, HttpProtocol.HTTP11).secure(spec -> spec.sslContext(serverCtx)), client -> client.protocol(HttpProtocol.H2, HttpProtocol.HTTP11).secure(spec -> spec.sslContext(clientCtx)), true, false);
}
Aggregations