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:
@ -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(_) =>
|
||||
|
@ -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))
|
||||
}
|
||||
|
Reference in New Issue
Block a user