mirror of https://github.com/fafhrd91/actix-web
pin h2 temporarily
This commit is contained in:
parent
dbea33b2f2
commit
114b94c485
|
@ -56,7 +56,7 @@ derive_more = "0.99.5"
|
|||
encoding_rs = "0.8"
|
||||
futures-core = { version = "0.3.7", default-features = false, features = ["alloc"] }
|
||||
futures-util = { version = "0.3.7", default-features = false, features = ["alloc", "sink"] }
|
||||
h2 = "0.3.1"
|
||||
h2 = "=0.3.7"
|
||||
http = "0.2.5"
|
||||
httparse = "1.5.1"
|
||||
httpdate = "1.0.1"
|
||||
|
|
|
@ -522,6 +522,15 @@ mod tests {
|
|||
assert_poll_next!(pl, Bytes::from("test"));
|
||||
}
|
||||
|
||||
#[actix_rt::test]
|
||||
async fn big_string() {
|
||||
let mut data = "HELLOWORLD".repeat(64 * 1024);
|
||||
let data_bytes = Bytes::from(data.clone());
|
||||
|
||||
assert!(data.is_complete_body());
|
||||
assert_eq!(data.take_complete_body(), data_bytes);
|
||||
}
|
||||
|
||||
// down-casting used to be done with a method on MessageBody trait
|
||||
// test is kept to demonstrate equivalence of Any trait
|
||||
#[actix_rt::test]
|
||||
|
|
|
@ -101,7 +101,7 @@ async fn test_h2_1() -> io::Result<()> {
|
|||
|
||||
#[actix_rt::test]
|
||||
async fn test_h2_body() -> io::Result<()> {
|
||||
let data = "HELLOWORLD".to_owned().repeat(64 * 1024);
|
||||
let data = "HELLOWORLD".to_owned().repeat(64 * 1024); // 640 KiB
|
||||
let mut srv = test_server(move || {
|
||||
HttpService::build()
|
||||
.h2(|mut req: Request<_>| async move {
|
||||
|
|
|
@ -72,7 +72,7 @@ cfg-if = "1"
|
|||
derive_more = "0.99.5"
|
||||
futures-core = { version = "0.3.7", default-features = false }
|
||||
futures-util = { version = "0.3.7", default-features = false }
|
||||
h2 = "0.3"
|
||||
h2 = "=0.3.7"
|
||||
http = "0.2.5"
|
||||
itoa = "0.4"
|
||||
log =" 0.4"
|
||||
|
|
Loading…
Reference in New Issue