1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00
This commit is contained in:
Nikolay Kim
2019-12-20 17:36:48 +06:00
parent 74fa4060c2
commit 8b8a9a995d
13 changed files with 31 additions and 27 deletions

View File

@ -55,8 +55,8 @@ rust-tls = { version = "0.16.0", package="rustls", optional = true, features = [
[dev-dependencies]
actix-connect = { version = "1.0.1", features=["openssl"] }
actix-web = { version = "2.0.0-alpha.5", features=["openssl"] }
actix-http = { version = "1.0.0", features=["openssl"] }
actix-web = { version = "2.0.0-rc", features=["openssl"] }
actix-http = { version = "1.0.1", features=["openssl"] }
actix-http-test = { version = "1.0.0", features=["openssl"] }
actix-utils = "1.0.3"
actix-server = "1.0.0"

View File

@ -4,9 +4,9 @@ use std::sync::Arc;
use actix_http::HttpService;
use actix_http_test::test_server;
use actix_service::{map_config, pipeline_factory, ServiceFactory, IntoServiceFactory};
use actix_service::{map_config, pipeline_factory, IntoServiceFactory, ServiceFactory};
use actix_web::http::Version;
use actix_web::{web, App, HttpResponse, dev::AppConfig};
use actix_web::{dev::AppConfig, web, App, HttpResponse};
use futures::future::ok;
use open_ssl::ssl::{SslAcceptor, SslFiletype, SslMethod, SslVerifyMode};
use rust_tls::ClientConfig;
@ -62,10 +62,13 @@ async fn _test_connection_reuse_h2() {
})
.and_then(
HttpService::build()
.h2(map_config(App::new()
.service(web::resource("/").route(web::to(|| HttpResponse::Ok())))
.into_factory(),
|_| AppConfig::default(),
.h2(map_config(
App::new()
.service(
web::resource("/").route(web::to(|| HttpResponse::Ok())),
)
.into_factory(),
|_| AppConfig::default(),
))
.openssl(ssl_acceptor())
.map_err(|_| ()),