1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 06:39:22 +02:00

fork cookie crate

This commit is contained in:
Nikolay Kim
2019-03-29 21:13:39 -07:00
parent 193f8fb2d9
commit d846328f36
40 changed files with 3357 additions and 253 deletions

View File

@ -1,11 +1,8 @@
use actix_service::NewService;
use bytes::{Bytes, BytesMut};
use bytes::Bytes;
use futures::future::{self, ok};
use futures::{Future, Stream};
use actix_http::{
error::PayloadError, http, HttpMessage, HttpService, Request, Response,
};
use actix_http::{http, HttpService, Request, Response};
use actix_http_test::TestServer;
const STR: &str = "Hello World Hello World Hello World Hello World Hello World \
@ -30,16 +27,6 @@ const STR: &str = "Hello World Hello World Hello World Hello World Hello World \
Hello World Hello World Hello World Hello World Hello World \
Hello World Hello World Hello World Hello World Hello World";
fn load_body<S>(stream: S) -> impl Future<Item = BytesMut, Error = PayloadError>
where
S: Stream<Item = Bytes, Error = PayloadError>,
{
stream.fold(BytesMut::new(), move |mut body, chunk| {
body.extend_from_slice(&chunk);
Ok::<_, PayloadError>(body)
})
}
#[test]
fn test_h1_v2() {
env_logger::init();