src/test/java/reactor/netty/http/server/ConnectionInfoTests.java
// Users may add SslHandler themselves, not by using `httpServer.secure`
Users may add SslHandler themselves, not by using `httpServer.secure`
Users may add SslHandler themselves not by using ` httpServer . secure `
@Test
	public void httpsUserAddedSslHandler() throws SSLException {
		SslContext clientSslContext = SslContextBuilder.forClient()
				.trustManager(InsecureTrustManagerFactory.INSTANCE).build();
		SslContext serverSslContext = SslContextBuilder.forServer(ssc.certificate(), ssc.privateKey()).build();
		testClientRequest(
				clientRequestHeaders -> {},
				serverRequest -> Assertions.assertThat(serverRequest.scheme()).isEqualTo("https"),
				httpClient -> httpClient.secure(ssl -> ssl.sslContext(clientSslContext)),
				httpServer -> httpServer.tcpConfiguration(tcpServer -> {
					tcpServer = tcpServer.bootstrap(serverBootstrap ->
							BootstrapHandlers.updateConfiguration(serverBootstrap, NettyPipeline.SslHandler, (connectionObserver, channel) -> {
								SslHandler sslHandler = serverSslContext.newHandler(channel.alloc());
								channel.pipeline().addFirst(NettyPipeline.SslHandler, sslHandler);
							}));
					return tcpServer;
				}),
				true);
	}
@ Test public void httpsUserAddedSslHandler ( ) throws SSLException { SslContext clientSslContext = SslContextBuilder . forClient ( ) . trustManager ( InsecureTrustManagerFactory . INSTANCE ) . build ( ) ; SslContext serverSslContext = SslContextBuilder . forServer ( ssc . certificate ( ) , ssc . privateKey ( ) ) . build ( ) ; testClientRequest ( clientRequestHeaders -> { } , serverRequest -> Assertions . assertThat ( serverRequest . scheme ( ) ) . isEqualTo ( "https" ) , httpClient -> httpClient . secure ( ssl -> ssl . sslContext ( clientSslContext ) ) , httpServer -> httpServer . tcpConfiguration ( tcpServer -> { tcpServer = tcpServer . bootstrap ( serverBootstrap -> BootstrapHandlers . updateConfiguration ( serverBootstrap , NettyPipeline . SslHandler , ( connectionObserver , channel ) -> { SslHandler sslHandler = serverSslContext . newHandler ( channel . alloc ( ) ) ; channel . pipeline ( ) . addFirst ( NettyPipeline . SslHandler , sslHandler ) ; } ) ) ; return tcpServer ; } ) , true ) ; }
Users may add SslHandler themselves, not by using `httpServer.secure`
Users may add SslHandler themselves not by using ` httpServer . secure `