1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 09:59:21 +02:00

update readme

This commit is contained in:
Nikolay Kim
2017-11-04 13:49:05 -07:00
parent 53868a88fa
commit f23974cfb5
3 changed files with 11 additions and 8 deletions

View File

@ -72,7 +72,7 @@ impl<T, A, H> Future for HttpChannel<T, A, H>
match h1.poll() {
Ok(Async::Ready(h1::Http1Result::Done)) =>
return Ok(Async::Ready(())),
Ok(Async::Ready(h1::Http1Result::Upgrade)) => (),
Ok(Async::Ready(h1::Http1Result::Switch)) => (),
Ok(Async::NotReady) =>
return Ok(Async::NotReady),
Err(_) =>

View File

@ -31,7 +31,7 @@ const HTTP2_PREFACE: [u8; 14] = *b"PRI * HTTP/2.0";
pub(crate) enum Http1Result {
Done,
Upgrade,
Switch,
}
pub(crate) struct Http1<T: AsyncWrite + 'static, A: 'static, H: 'static> {
@ -157,7 +157,7 @@ impl<T, A, H> Http1<T, A, H>
// no keep-alive
if !self.keepalive && self.tasks.is_empty() {
if self.h2 {
return Ok(Async::Ready(Http1Result::Upgrade))
return Ok(Async::Ready(Http1Result::Switch))
} else {
return Ok(Async::Ready(Http1Result::Done))
}