mirror of
https://github.com/actix/actix-web.git
synced 2025-04-10 11:54:06 +00:00
remove test-server and Cargo.toml dev-dependencies changes
This commit is contained in:
parent
7492ef4a2e
commit
3dc594a00b
11 changed files with 40 additions and 60 deletions
|
@ -32,4 +32,4 @@ percent-encoding = "1.0"
|
|||
v_htmlescape = "0.4"
|
||||
|
||||
[dev-dependencies]
|
||||
actix-web = { version = "1.0.2", features = ["flate2-zlib"] }
|
||||
actix-web = { version = "1.0.2", features=["ssl"] }
|
||||
|
|
|
@ -32,5 +32,7 @@ futures = "0.1.25"
|
|||
log = "0.4"
|
||||
|
||||
[dev-dependencies]
|
||||
actix-http-test = "0.2.4"
|
||||
actix-server = { version = "0.6.0", features=["ssl"] }
|
||||
actix-connect = { version = "0.2.0", features=["ssl"] }
|
||||
actix-http-test = { version = "0.2.4", features=["ssl"] }
|
||||
actix-utils = "0.4.4"
|
||||
|
|
|
@ -100,6 +100,10 @@ chrono = "0.4.6"
|
|||
|
||||
[dev-dependencies]
|
||||
actix-rt = "0.2.2"
|
||||
actix-server = "0.6.0"
|
||||
actix-http-test = { version = "0.2.4", features = ["rust-tls", "ssl"] }
|
||||
actix-server = { version = "0.6.0", features=["ssl"] }
|
||||
actix-connect = { version = "0.2.0", features=["ssl"] }
|
||||
actix-http-test = { version = "0.2.4", features=["ssl"] }
|
||||
env_logger = "0.6"
|
||||
serde_derive = "1.0"
|
||||
openssl = { version="0.10" }
|
||||
tokio-tcp = "0.1"
|
||||
|
|
|
@ -25,5 +25,6 @@ serde_json = "1.0"
|
|||
time = "0.1.42"
|
||||
|
||||
[dev-dependencies]
|
||||
actix-rt = "0.2.2"
|
||||
actix-http = "0.2.3"
|
||||
bytes = "0.4"
|
||||
bytes = "0.4"
|
|
@ -30,4 +30,5 @@ time = "0.1"
|
|||
twoway = "0.2"
|
||||
|
||||
[dev-dependencies]
|
||||
actix-http = "0.2.4"
|
||||
actix-rt = "0.2.2"
|
||||
actix-http = "0.2.4"
|
|
@ -33,3 +33,6 @@ hashbrown = "0.5.0"
|
|||
serde = "1.0"
|
||||
serde_json = "1.0"
|
||||
time = "0.1.42"
|
||||
|
||||
[dev-dependencies]
|
||||
actix-rt = "0.2.2"
|
||||
|
|
|
@ -26,4 +26,5 @@ bytes = "0.4"
|
|||
futures = "0.1.25"
|
||||
|
||||
[dev-dependencies]
|
||||
actix-http-test = "0.2.4"
|
||||
env_logger = "0.6"
|
||||
actix-http-test = { version = "0.2.4", features=["ssl"] }
|
||||
|
|
|
@ -16,7 +16,7 @@ quote = "0.6.12"
|
|||
syn = { version = "0.15.34", features = ["full", "parsing", "extra-traits"] }
|
||||
|
||||
[dev-dependencies]
|
||||
actix-web = "1.0.0"
|
||||
actix-http = "0.2.4"
|
||||
actix-http-test = "0.2.0"
|
||||
futures = "0.1"
|
||||
actix-web = { version = "1.0.0" }
|
||||
actix-http = { version = "0.2.4", features=["ssl"] }
|
||||
actix-http-test = { version = "0.2.0", features=["ssl"] }
|
||||
futures = { version = "0.1" }
|
||||
|
|
|
@ -62,9 +62,15 @@ rustls = { version = "0.15.2", optional = true }
|
|||
|
||||
[dev-dependencies]
|
||||
actix-rt = "0.2.2"
|
||||
actix-web = "1.0.0"
|
||||
actix-http-test = { version = "0.2.4", features = ["ssl", "rust-tls"] }
|
||||
actix-server = "0.6.0"
|
||||
brotli2 = "0.3.2"
|
||||
flate2 = "1.0.2"
|
||||
actix-web = { version = "1.0.0", features=["ssl"] }
|
||||
actix-http = { version = "0.2.4", features=["ssl"] }
|
||||
actix-http-test = { version = "0.2.0", features=["ssl"] }
|
||||
actix-utils = "0.4.1"
|
||||
actix-server = { version = "0.6.0", features=["ssl", "rust-tls"] }
|
||||
brotli2 = { version="0.3.2" }
|
||||
flate2 = { version="1.0.2" }
|
||||
env_logger = "0.6"
|
||||
rand = "0.7"
|
||||
tokio-tcp = "0.1"
|
||||
webpki = "0.19"
|
||||
rustls = { version = "0.15.2", features = ["dangerous_configuration"] }
|
||||
|
|
|
@ -27,18 +27,16 @@ path = "src/lib.rs"
|
|||
default = []
|
||||
|
||||
# openssl
|
||||
ssl = ["openssl", "actix-server/ssl", "awc/ssl", "actix-http/ssl"]
|
||||
rust-tls = ["rustls", "webpki", "actix-server/rust-tls", "awc/rust-tls", "actix-http/rust-tls"]
|
||||
ssl = ["openssl", "actix-server/ssl", "awc/ssl"]
|
||||
|
||||
[dependencies]
|
||||
actix-codec = "0.1.2"
|
||||
actix-connect = "0.2"
|
||||
actix-rt = "0.2.4"
|
||||
actix-rt = "0.2.2"
|
||||
actix-service = "0.4.1"
|
||||
actix-server = "0.6.0"
|
||||
actix-utils = "0.4.1"
|
||||
actix-http = "0.2.8"
|
||||
awc = "0.2.2"
|
||||
actix-connect = "0.2.2"
|
||||
|
||||
base64 = "0.10"
|
||||
bytes = "0.4"
|
||||
|
@ -56,8 +54,7 @@ time = "0.1"
|
|||
tokio-tcp = "0.1"
|
||||
tokio-timer = "0.2"
|
||||
openssl = { version="0.10", optional = true }
|
||||
rustls = { version = "0.15.2", optional = true, features = ["dangerous_configuration"] }
|
||||
webpki = { version = "0.19", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
actix-web = "1.0.0"
|
||||
actix-http = "0.2.4"
|
||||
|
|
|
@ -69,23 +69,6 @@ where
|
|||
RT.with(move |rt| rt.borrow_mut().get_mut().block_on(lazy(f)))
|
||||
}
|
||||
|
||||
#[cfg(feature = "rust-tls")]
|
||||
mod danger {
|
||||
pub struct NoCertificateVerification {}
|
||||
|
||||
impl rustls::ServerCertVerifier for NoCertificateVerification {
|
||||
fn verify_server_cert(
|
||||
&self,
|
||||
_roots: &rustls::RootCertStore,
|
||||
_presented_certs: &[rustls::Certificate],
|
||||
_dns_name: webpki::DNSNameRef<'_>,
|
||||
_ocsp: &[u8],
|
||||
) -> Result<rustls::ServerCertVerified, rustls::TLSError> {
|
||||
Ok(rustls::ServerCertVerified::assertion())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// The `TestServer` type.
|
||||
///
|
||||
/// `TestServer` is very simple test server that simplify process of writing
|
||||
|
@ -168,25 +151,7 @@ impl TestServer {
|
|||
.ssl(builder.build())
|
||||
.finish()
|
||||
}
|
||||
#[cfg(all(not(feature = "ssl"), feature = "rust-tls"))]
|
||||
{
|
||||
use rustls::ClientConfig;
|
||||
use std::sync::Arc;
|
||||
|
||||
let mut config = ClientConfig::new();
|
||||
let protos = vec![b"h2".to_vec(), b"http/1.1".to_vec()];
|
||||
config.set_protocols(&protos);
|
||||
config.dangerous().set_certificate_verifier(Arc::new(
|
||||
danger::NoCertificateVerification {},
|
||||
));
|
||||
|
||||
Connector::new()
|
||||
.conn_lifetime(time::Duration::from_secs(0))
|
||||
.timeout(time::Duration::from_millis(500))
|
||||
.rustls(Arc::new(config))
|
||||
.finish()
|
||||
}
|
||||
#[cfg(not(any(feature = "ssl", feature = "rust-tls")))]
|
||||
#[cfg(not(feature = "ssl"))]
|
||||
{
|
||||
Connector::new()
|
||||
.conn_lifetime(time::Duration::from_secs(0))
|
||||
|
@ -201,7 +166,7 @@ impl TestServer {
|
|||
rt.block_on(lazy(
|
||||
|| Ok::<_, ()>(actix_connect::start_default_resolver()),
|
||||
))
|
||||
.unwrap();
|
||||
.unwrap();
|
||||
System::set_current(system);
|
||||
TestServerRuntime { addr, rt, client }
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue