mirror of https://github.com/fafhrd91/actix-web
Ensure that awc::ws::WebsocketsRequest sets the Host header before connecting.
This commit is contained in:
parent
c9400456f6
commit
07875bf211
|
@ -233,6 +233,8 @@ impl WebsocketsRequest {
|
|||
return Either::A(err(InvalidUrl::UnknownScheme.into()));
|
||||
}
|
||||
|
||||
self.head.headers.insert(header::HOST, HeaderValue::from_str(uri.host().unwrap()).unwrap());
|
||||
|
||||
// set cookies
|
||||
if let Some(ref mut jar) = self.cookies {
|
||||
let mut cookie = String::new();
|
||||
|
|
Loading…
Reference in New Issue