mirror of
https://github.com/actix/actix-web.git
synced 2025-04-10 11:54:06 +00:00
Fix bad check for port being needed
This commit is contained in:
parent
4b170ad4dc
commit
9a8fc6efdf
1 changed files with 3 additions and 2 deletions
|
@ -238,10 +238,11 @@ impl WebsocketsRequest {
|
|||
let scheme = uri.scheme_str();
|
||||
// https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
|
||||
// requires us to include the port if it's not standard
|
||||
let needs_port = ((scheme == Some("http") || scheme == Some("ws"))
|
||||
let needs_port = (((scheme == Some("http") || scheme == Some("ws"))
|
||||
&& port != Some(80))
|
||||
|| ((scheme == Some("https") || scheme == Some("wss"))
|
||||
&& port != Some(443));
|
||||
&& port != Some(443)))
|
||||
&& port.is_some();
|
||||
if needs_port {
|
||||
self.head.headers.insert(
|
||||
header::HOST,
|
||||
|
|
Loading…
Reference in a new issue