From f8b8fe3865f28d5746c45c5961ec261f8b5a1ce4 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Fri, 9 Mar 2018 05:38:07 -0800 Subject: [PATCH] add space to cookie header --- src/client/request.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client/request.rs b/src/client/request.rs index f25492332..095f8d7f6 100644 --- a/src/client/request.rs +++ b/src/client/request.rs @@ -545,10 +545,10 @@ impl ClientRequestBuilder { for c in jar.delta() { let name = percent_encode(c.name().as_bytes(), USERINFO_ENCODE_SET); let value = percent_encode(c.value().as_bytes(), USERINFO_ENCODE_SET); - let _ = write!(&mut cookie, ";{}={}", name, value); + let _ = write!(&mut cookie, "; {}={}", name, value); } request.headers.insert( - header::COOKIE, HeaderValue::from_str(&cookie.as_str()[1..]).unwrap()); + header::COOKIE, HeaderValue::from_str(&cookie.as_str()[2..]).unwrap()); } request.body = body.into(); Ok(request)