File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ use test_programs:: wasi:: http:: types:: { FieldsType , Headers } ;
2+
3+ fn main ( ) {
4+ let hdrs = Headers :: new ( FieldsType :: Request , & [ ] ) ;
5+ assert ! ( hdrs
6+ . set( & "transfer-encoding" . to_owned( ) , & [ b"bad" . to_vec( ) ] )
7+ . is_err( ) ) ;
8+
9+ assert ! ( hdrs
10+ . append( & "tRaNsFeR-eNcOdInG" . to_owned( ) , & b"bad" . to_vec( ) )
11+ . is_err( ) ) ;
12+ }
Original file line number Diff line number Diff line change @@ -49,6 +49,12 @@ async fn http_outbound_request_invalid_version() -> Result<()> {
4949 run ( HTTP_OUTBOUND_REQUEST_INVALID_VERSION_COMPONENT , & server) . await
5050}
5151
52+ #[ test_log:: test( tokio:: test( flavor = "multi_thread" ) ) ]
53+ async fn http_outbound_request_invalid_header ( ) -> Result < ( ) > {
54+ let server = Server :: http2 ( ) ?;
55+ run ( HTTP_OUTBOUND_REQUEST_INVALID_HEADER_COMPONENT , & server) . await
56+ }
57+
5258#[ test_log:: test( tokio:: test( flavor = "multi_thread" ) ) ]
5359async fn http_outbound_request_unknown_method ( ) -> Result < ( ) > {
5460 let server = Server :: http1 ( ) ?;
Original file line number Diff line number Diff line change @@ -48,6 +48,12 @@ fn http_outbound_request_invalid_version() -> Result<()> {
4848 run ( HTTP_OUTBOUND_REQUEST_INVALID_VERSION_COMPONENT , & server)
4949}
5050
51+ #[ test_log:: test]
52+ fn http_outbound_request_invalid_header ( ) -> Result < ( ) > {
53+ let server = Server :: http2 ( ) ?;
54+ run ( HTTP_OUTBOUND_REQUEST_INVALID_HEADER_COMPONENT , & server)
55+ }
56+
5157#[ test_log:: test]
5258fn http_outbound_request_unknown_method ( ) -> Result < ( ) > {
5359 let server = Server :: http1 ( ) ?;
You can’t perform that action at this time.
0 commit comments