fn push_promise_from_client() {
        let mut s = Session::default().unwrap();
        s.handshake().unwrap();

        let (stream, req) = s.send_request(false).unwrap();

        let header_block = s.client.encode_header_block(&req).unwrap();

        s.send_frame_client(
            frame::Frame::PushPromise {
                push_id: 1,
                header_block,
            },
            stream,
            false,
        )
        .unwrap();

        let ev_headers = Event::Headers {
            list: req,
            has_body: true,
        };

        assert_eq!(s.poll_server(), Ok((stream, ev_headers)));
        assert_eq!(s.poll_server(), Err(Error::FrameUnexpected));
    }
/// Send a PUSH_PROMISE frame from the client, which is forbidden.
Send a PUSH_PROMISE frame from the client, which is forbidden.
Send a PUSH_PROMISE frame from the client which is forbidden .
fn push_promise_from_client() {
        let mut s = Session::default().unwrap();
        s.handshake().unwrap();
        let (stream, req) = s.send_request(false).unwrap();
        let header_block = s.client.encode_header_block(&req).unwrap();
        s.send_frame_client(
            frame::Frame::PushPromise {
                push_id: 1,
                header_block,
            },
            stream,
            false,
        )
        .unwrap();
        let ev_headers = Event::Headers {
            list: req,
            has_body: true,
        };
        assert_eq!(s.poll_server(), Ok((stream, ev_headers)));
        assert_eq!(s.poll_server(), Err(Error::FrameUnexpected));
    }
fn push_promise_from_client ( ) { let mut s = Session :: default ( ) . unwrap ( ) ; s . handshake ( ) . unwrap ( ) ; let ( stream , req ) = s . send_request ( false ) . unwrap ( ) ; let header_block = s . client . encode_header_block ( & req ) . unwrap ( ) ; s . send_frame_client ( frame :: Frame :: PushPromise { push_id : 1 , header_block , } , stream , false , ) . unwrap ( ) ; let ev_headers = Event :: Headers { list : req , has_body : true , } ; assert_eq ! ( s poll_server ( ) Ok ( ( stream ev_headers ) ) ) ; assert_eq ! ( s poll_server ( ) Err ( Error FrameUnexpected ) ) ; }
Send a PUSH_PROMISE frame from the client, which is forbidden.
Send a PUSH_PROMISE frame from the client which is forbidden .