diff --git a/Cargo.toml b/Cargo.toml index a935666b19e..6f13efac26f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,8 +44,8 @@ default = ["compress", "cookies"] # content-encoding support compress = ["actix-http/compress", "awc/compress"] -# cookies feature -cookies = ["actix-http/cookies"] +# support for cookies +cookies = ["actix-http/cookies", "awc/cookies"] # secure cookies feature secure-cookies = ["actix-http/secure-cookies"] diff --git a/actix-http/src/h1/encoder.rs b/actix-http/src/h1/encoder.rs index 69e69de4212..97916e7dbb7 100644 --- a/actix-http/src/h1/encoder.rs +++ b/actix-http/src/h1/encoder.rs @@ -549,7 +549,6 @@ mod tests { ); let data = String::from_utf8(Vec::from(bytes.split().freeze().as_ref())).unwrap(); - eprintln!("{}", &data); assert!(data.contains("Content-Length: 0\r\n")); assert!(data.contains("Connection: close\r\n")); diff --git a/actix-http/src/http_message.rs b/actix-http/src/http_message.rs index 577de8d59db..b1f04e50d82 100644 --- a/actix-http/src/http_message.rs +++ b/actix-http/src/http_message.rs @@ -108,8 +108,6 @@ pub trait HttpMessage: Sized { /// Load request cookies. #[cfg(feature = "cookies")] fn cookies(&self) -> Result>>, CookieParseError> { - eprintln!("default impl cookies?"); - if self.extensions().get::().is_none() { let mut cookies = Vec::new(); for hdr in self.headers().get_all(header::COOKIE) { diff --git a/awc/src/response.rs b/awc/src/response.rs index 242bdb6235c..a9284963196 100644 --- a/awc/src/response.rs +++ b/awc/src/response.rs @@ -47,12 +47,10 @@ impl HttpMessage for ClientResponse { /// Load request cookies. #[cfg(feature = "cookies")] fn cookies(&self) -> Result>>, CookieParseError> { - eprintln!("awc fn cookies"); struct Cookies(Vec>); if self.extensions().get::().is_none() { - eprintln!("no cookies, inserting"); let mut cookies = Vec::new(); for hdr in self.headers().get_all(&header::SET_COOKIE) { let s = std::str::from_utf8(hdr.as_bytes()).map_err(CookieParseError::from)?; diff --git a/tests/test_server.rs b/tests/test_server.rs index 6bf8dbcb602..c2e627a3faa 100644 --- a/tests/test_server.rs +++ b/tests/test_server.rs @@ -810,14 +810,11 @@ async fn test_server_cookies() { let res = req.send().await.unwrap(); assert!(res.status().is_success()); - eprintln!("{:?}", &res); - let first_cookie = http::CookieBuilder::new("first", "first_value") .http_only(true) .finish(); let second_cookie = http::Cookie::new("second", "second_value"); - eprintln!("gimme cookie"); let cookies = res.cookies().expect("To have cookies"); assert_eq!(cookies.len(), 2); if cookies[0] == first_cookie {