From f737a3eb3edbf616ec50ac9e406cfb883c8b8799 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Sun, 22 Oct 2017 21:52:01 -0700 Subject: [PATCH] different ports --- Cargo.toml | 9 ++++++++- examples/multipart/Cargo.toml | 2 +- examples/websocket-chat/Cargo.toml | 2 +- examples/websocket-chat/README.md | 2 +- tests/test_server.rs | 8 ++++---- 5 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 23ab441c..b19a548d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,6 +20,12 @@ codecov = { repository = "fafhrd91/actix-web", branch = "master", service = "git name = "actix_web" path = "src/lib.rs" +[features] +default = [] + +# http/2 +http2 = ["h2"] + [dependencies] log = "0.3" time = "0.1" @@ -40,10 +46,11 @@ futures = "0.1" tokio-core = "0.1" tokio-io = "0.1" tokio-proto = "0.1" +h2 = { git = 'https://github.com/carllerche/h2', optional = true } [dependencies.actix] #path = "../actix" -git = "https://github.com/fafhrd91/actix.git" +git = "https://github.com/actix/actix.git" #version = "0.2" default-features = false features = [] diff --git a/examples/multipart/Cargo.toml b/examples/multipart/Cargo.toml index 8dc69edf..5ea4d9d4 100644 --- a/examples/multipart/Cargo.toml +++ b/examples/multipart/Cargo.toml @@ -10,5 +10,5 @@ path = "src/main.rs" [dependencies] env_logger = "*" # actix = "0.2" -actix = { git = "https://github.com/fafhrd91/actix.git" } +actix = { git = "https://github.com/actix/actix.git" } actix-web = { path = "../../" } diff --git a/examples/websocket-chat/Cargo.toml b/examples/websocket-chat/Cargo.toml index 5303915d..5915a0e5 100644 --- a/examples/websocket-chat/Cargo.toml +++ b/examples/websocket-chat/Cargo.toml @@ -24,6 +24,6 @@ serde = "1.0" serde_json = "1.0" serde_derive = "1.0" -actix = { git = "https://github.com/fafhrd91/actix.git" } +actix = { git = "https://github.com/actix/actix.git" } # actix = { path = "../../../actix" } actix-web = { path = "../../" } diff --git a/examples/websocket-chat/README.md b/examples/websocket-chat/README.md index 3d0fa69f..2e75343b 100644 --- a/examples/websocket-chat/README.md +++ b/examples/websocket-chat/README.md @@ -1,7 +1,7 @@ # Websocket chat example This is extension of the -[actix chat example](https://github.com/fafhrd91/actix/tree/master/examples/chat) +[actix chat example](https://github.com/actix/actix/tree/master/examples/chat) Added features: diff --git a/tests/test_server.rs b/tests/test_server.rs index 6a94a5a7..1a742081 100644 --- a/tests/test_server.rs +++ b/tests/test_server.rs @@ -39,14 +39,14 @@ fn test_serve_incoming() { let sys = System::new("test"); let srv = create_server(); - let addr = net::SocketAddr::from_str("127.0.0.1:58906").unwrap(); + let addr = net::SocketAddr::from_str("127.0.0.1:58903").unwrap(); let tcp = TcpListener::bind(&addr, Arbiter::handle()).unwrap(); srv.serve_incoming::<_, ()>(tcp.incoming()).unwrap(); sys.run(); }); - assert!(reqwest::get("http://localhost:58906/").unwrap().status().is_success()); + assert!(reqwest::get("http://localhost:58903/").unwrap().status().is_success()); } struct MiddlewareTest { @@ -94,11 +94,11 @@ fn test_middlewares() { httpcodes::HTTPOk })) .finish()]) - .serve::<_, ()>("127.0.0.1:58903").unwrap(); + .serve::<_, ()>("127.0.0.1:58904").unwrap(); sys.run(); }); - assert!(reqwest::get("http://localhost:58903/").unwrap().status().is_success()); + assert!(reqwest::get("http://localhost:58904/").unwrap().status().is_success()); assert_eq!(num1.load(Ordering::Relaxed), 1); assert_eq!(num2.load(Ordering::Relaxed), 1);