mirror of
https://github.com/actix/actix-web.git
synced 2024-12-18 14:16:47 +00:00
update h2 lib
This commit is contained in:
parent
3768a2885d
commit
3a59344ffb
4 changed files with 11 additions and 8 deletions
|
@ -115,3 +115,6 @@ members = [
|
|||
"examples/websocket",
|
||||
"examples/websocket-chat",
|
||||
]
|
||||
|
||||
[patch.crates-io]
|
||||
ring = { git = "https://github.com/SergioBenitez/ring", branch = "v0.12" }
|
||||
|
|
|
@ -84,7 +84,7 @@ fn main() {
|
|||
}
|
||||
}))
|
||||
// static files
|
||||
.handler("/static/", fs::StaticFiles::new("tail", "../static/", true))
|
||||
.handler("/static/", fs::StaticFiles::new("../static/", true))
|
||||
// redirect
|
||||
.resource("/", |r| r.method(Method::GET).f(|req| {
|
||||
println!("{:?}", req);
|
||||
|
|
|
@ -8,7 +8,7 @@ use std::collections::VecDeque;
|
|||
use actix::Arbiter;
|
||||
use http::request::Parts;
|
||||
use http2::{Reason, RecvStream};
|
||||
use http2::server::{Server, Handshake, Respond};
|
||||
use http2::server::{self, Connection, Handshake, SendResponse};
|
||||
use bytes::{Buf, Bytes};
|
||||
use futures::{Async, Poll, Future, Stream};
|
||||
use tokio_io::{AsyncRead, AsyncWrite};
|
||||
|
@ -44,7 +44,7 @@ pub(crate) struct Http2<T, H>
|
|||
|
||||
enum State<T: AsyncRead + AsyncWrite> {
|
||||
Handshake(Handshake<T, Bytes>),
|
||||
Server(Server<T, Bytes>),
|
||||
Server(Connection<T, Bytes>),
|
||||
Empty,
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ impl<T, H> Http2<T, H>
|
|||
addr: addr,
|
||||
tasks: VecDeque::new(),
|
||||
state: State::Handshake(
|
||||
Server::handshake(IoWrapper{unread: Some(buf), inner: io})),
|
||||
server::handshake(IoWrapper{unread: Some(buf), inner: io})),
|
||||
keepalive_timer: None,
|
||||
}
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ struct Entry {
|
|||
impl Entry {
|
||||
fn new<H>(parts: Parts,
|
||||
recv: RecvStream,
|
||||
resp: Respond<Bytes>,
|
||||
resp: SendResponse<Bytes>,
|
||||
addr: Option<SocketAddr>,
|
||||
settings: &Rc<WorkerSettings<H>>) -> Entry
|
||||
where H: HttpHandler + 'static
|
||||
|
|
|
@ -2,7 +2,7 @@ use std::{io, cmp};
|
|||
use bytes::{Bytes, BytesMut};
|
||||
use futures::{Async, Poll};
|
||||
use http2::{Reason, SendStream};
|
||||
use http2::server::Respond;
|
||||
use http2::server::SendResponse;
|
||||
use http::{Version, HttpTryFrom, Response};
|
||||
use http::header::{HeaderValue, CONNECTION, TRANSFER_ENCODING, DATE, CONTENT_LENGTH};
|
||||
|
||||
|
@ -26,7 +26,7 @@ bitflags! {
|
|||
}
|
||||
|
||||
pub(crate) struct H2Writer {
|
||||
respond: Respond<Bytes>,
|
||||
respond: SendResponse<Bytes>,
|
||||
stream: Option<SendStream<Bytes>>,
|
||||
encoder: PayloadEncoder,
|
||||
flags: Flags,
|
||||
|
@ -36,7 +36,7 @@ pub(crate) struct H2Writer {
|
|||
|
||||
impl H2Writer {
|
||||
|
||||
pub fn new(respond: Respond<Bytes>, buf: SharedBytes) -> H2Writer {
|
||||
pub fn new(respond: SendResponse<Bytes>, buf: SharedBytes) -> H2Writer {
|
||||
H2Writer {
|
||||
respond: respond,
|
||||
stream: None,
|
||||
|
|
Loading…
Reference in a new issue