Get large body writes working

This commit is contained in:
Carl Lerche
2017-08-12 11:02:50 -07:00
parent 570962353b
commit 150c3160be
5 changed files with 30 additions and 18 deletions

View File

@@ -48,7 +48,7 @@ fn recv_invalid_server_stream_id() {
.body(()).unwrap();
info!("sending request");
let mut stream = h2.request(request, true).unwrap();
let stream = h2.request(request, true).unwrap();
// The connection errors
assert_proto_err!(h2.wait().unwrap_err(), ProtocolError);

View File

@@ -1,16 +1,14 @@
pub mod support;
use support::*;
use h2::Frame;
#[test]
#[ignore]
fn recv_single_ping() {
/*
let _ = ::env_logger::init();
let mock = mock_io::Builder::new()
.handshake()
/*
.write(&[
// POST /
0, 0, 16, 1, 4, 0, 0, 0, 1, 131, 135, 65, 139, 157, 41,
@@ -28,9 +26,9 @@ fn recv_single_ping() {
// DATA
0, 0, 5, 0, 1, 0, 0, 0, 1, 119, 111, 114, 108, 100
])
*/
.build();
*/
/*
let h2 = client::handshake(mock)
.wait().unwrap();

View File

@@ -62,12 +62,12 @@ fn single_stream_send_extra_large_body_multi_frames() {
0, 64, 0, 0, 0, 0, 0, 0, 1,
])
.write(&payload[0..16_384])
.write(frames::SETTINGS_ACK)
.write(&[
// DATA
0, 64, 0, 0, 1, 0, 0, 0, 1,
])
.write(&payload[16_384..])
.write(frames::SETTINGS_ACK)
// Read response
.read(&[0, 0, 1, 1, 5, 0, 0, 0, 1, 0x89])
.build();