private void configureAsHttp(Channel ch, ChannelPromise connectionPromise) {
        final ChannelPipeline pipeline = ch.pipeline();
        pipeline.addLast(TrafficLoggingHandler.CLIENT);

        if (attemptUpgrade()) {
            configureUpgradeCodec(ch, pipeline::addLast);
        } else {
            pipeline.addLast(newHttp1Codec(
                    clientFactory.http1MaxInitialLineLength(),
                    clientFactory.http1MaxHeaderSize(),
                    clientFactory.http1MaxChunkSize()));

            // NB: We do not call finishSuccessfully() immediately here
            //     because HttpSessionHandler is added when connectionPromise completes.
            connectionPromise.addListener(future -> {
                if (future.isSuccess()) {
                    finishSuccessfully(pipeline, H1C);
                }
            });
        }
    }
Configures the specified {@link SslHandler} with common settings.
core/src/main/java/com/linecorp/armeria/client/HttpClientPipelineConfigurator.java