From f8b176de9ec17bd338229f96a1adbdaaadda0abb Mon Sep 17 00:00:00 2001 From: Douman Date: Tue, 2 Oct 2018 20:09:31 +0300 Subject: [PATCH] Fix no_http2 flag in HttpServer (#526) --- CHANGES.md | 1 + src/server/http.rs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 375f2882f..a55ef7ec2 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -21,6 +21,7 @@ * Responses with the following codes: 100, 101, 102, 204 -- are sent without Content-Length header. #521 +* Correct usage of `no_http2` flag in `bind_*` methods. #519 ## [0.7.8] - 2018-09-17 diff --git a/src/server/http.rs b/src/server/http.rs index 91f5d73e0..6a7790c13 100644 --- a/src/server/http.rs +++ b/src/server/http.rs @@ -414,7 +414,7 @@ where use actix_net::service::NewServiceExt; // alpn support - let flags = if !self.no_http2 { + let flags = if self.no_http2 { ServerFlags::HTTP1 } else { ServerFlags::HTTP1 | ServerFlags::HTTP2 @@ -437,7 +437,7 @@ where use actix_net::service::NewServiceExt; // alpn support - let flags = if !self.no_http2 { + let flags = if self.no_http2 { ServerFlags::HTTP1 } else { ServerFlags::HTTP1 | ServerFlags::HTTP2