Skip to content

Commit

Permalink
revert printlns
Browse files Browse the repository at this point in the history
  • Loading branch information
robjtede committed Feb 13, 2021
1 parent 5175312 commit 4fb1d8c
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 9 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -45,7 +45,7 @@ default = ["compress", "cookies"]
compress = ["actix-http/compress", "awc/compress"]

# support for cookies
cookies = ["actix-http/cookies"]
cookies = ["actix-http/cookies", "awc/cookies"]

# secure cookies feature
secure-cookies = ["actix-http/secure-cookies"]
Expand Down
1 change: 0 additions & 1 deletion actix-http/src/h1/encoder.rs
Expand Up @@ -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"));
Expand Down
2 changes: 0 additions & 2 deletions actix-http/src/http_message.rs
Expand Up @@ -108,8 +108,6 @@ pub trait HttpMessage: Sized {
/// Load request cookies.
#[cfg(feature = "cookies")]
fn cookies(&self) -> Result<Ref<'_, Vec<Cookie<'static>>>, CookieParseError> {
eprintln!("default impl cookies?");

if self.extensions().get::<Cookies>().is_none() {
let mut cookies = Vec::new();
for hdr in self.headers().get_all(header::COOKIE) {
Expand Down
2 changes: 0 additions & 2 deletions awc/src/response.rs
Expand Up @@ -47,12 +47,10 @@ impl<S> HttpMessage for ClientResponse<S> {
/// Load request cookies.
#[cfg(feature = "cookies")]
fn cookies(&self) -> Result<Ref<'_, Vec<Cookie<'static>>>, CookieParseError> {
eprintln!("awc fn cookies");

struct Cookies(Vec<Cookie<'static>>);

if self.extensions().get::<Cookies>().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)?;
Expand Down
3 changes: 0 additions & 3 deletions tests/test_server.rs
Expand Up @@ -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 {
Expand Down

0 comments on commit 4fb1d8c

Please sign in to comment.