Source:
<code>public HttpService start() throws Exception { TestResourceUnavailableException.throwIfResourceUnavailable(getClass(), ROOT_WAR_PATH); try { if (httpsEnabled) { for (Connector c: server.getConnectors()) { server.removeConnector(c); } InputStream keyStoreStream = ResourceUtils.create(this).getResourceFromUrl(SERVER_KEYSTORE); KeyStore keyStore; try { keyStore = SecureKeys.newKeyStore(keyStoreStream, "password"); } finally { keyStoreStream.close(); } SslContextFactory sslContextFactory = new SslContextFactory(); sslContextFactory.setKeyStore(keyStore); sslContextFactory.setTrustAll(true); sslContextFactory.setKeyStorePassword("password"); HttpConfiguration sslHttpConfig = new HttpConfiguration(); sslHttpConfig.setSecureScheme("https"); sslHttpConfig.setSecurePort(actualPort); <START> ServerConnector httpsConnector = new ServerConnector(server, new SslConnectionFactory(sslContextFactory, "http/1.1"), new HttpConnectionFactory(sslHttpConfig)); <END> httpsConnector.setPort(actualPort); server.addConnector(httpsConnector); } addShutdownHook(); File tmpWarFile = Os.writeToTempFile( ResourceUtils.create(this).getResourceFromUrl(ROOT_WAR_URL), "TestHttpService", ".war"); WebAppContext context = new WebAppContext(); context.setWar(tmpWarFile.getAbsolutePath()); context.setContextPath("/"); context.setParentLoaderPriority(true); if (securityHandler.isPresent()) { context.setSecurityHandler(securityHandler.get()); } server.setHandler(context); server.start(); log.info("Started test HttpService at "+getUrl()); } catch (Exception e) { try { shutdown(); } catch (Exception e2) { log.warn("Error shutting down HttpService while recovering from earlier error (re-throwing earlier error)", e2); throw e; } } return this; }</code><technical_language>HttpVersion.HTTP_1_1.asString() instead</technical_language>

Target:
public HttpService start() throws Exception { TestResourceUnavailableException.throwIfResourceUnavailable(getClass(), ROOT_WAR_PATH); try { if (httpsEnabled) { for (Connector c: server.getConnectors()) { server.removeConnector(c); } InputStream keyStoreStream = ResourceUtils.create(this).getResourceFromUrl(SERVER_KEYSTORE); KeyStore keyStore; try { keyStore = SecureKeys.newKeyStore(keyStoreStream, "password"); } finally { keyStoreStream.close(); } SslContextFactory sslContextFactory = new SslContextFactory(); sslContextFactory.setKeyStore(keyStore); sslContextFactory.setTrustAll(true); sslContextFactory.setKeyStorePassword("password"); HttpConfiguration sslHttpConfig = new HttpConfiguration(); sslHttpConfig.setSecureScheme("https"); sslHttpConfig.setSecurePort(actualPort); ServerConnector httpsConnector = new ServerConnector(server, new SslConnectionFactory(sslContextFactory, HttpVersion.HTTP_1_1.asString()), new HttpConnectionFactory(sslHttpConfig)); httpsConnector.setPort(actualPort); server.addConnector(httpsConnector); } addShutdownHook(); File tmpWarFile = Os.writeToTempFile( ResourceUtils.create(this).getResourceFromUrl(ROOT_WAR_URL), "TestHttpService", ".war"); WebAppContext context = new WebAppContext(); context.setWar(tmpWarFile.getAbsolutePath()); context.setContextPath("/"); context.setParentLoaderPriority(true); if (securityHandler.isPresent()) { context.setSecurityHandler(securityHandler.get()); } server.setHandler(context); server.start(); log.info("Started test HttpService at "+getUrl()); } catch (Exception e) { try { shutdown(); } catch (Exception e2) { log.warn("Error shutting down HttpService while recovering from earlier error (re-throwing earlier error)", e2); throw e; } } return this; }