@@ -131,6 +131,9 @@ pub(super) enum User {
131
131
feature = "ffi"
132
132
) ) ]
133
133
BodyWriteAborted ,
134
+ /// User tried to send a connect request with a nonzero body
135
+ #[ cfg( all( feature = "client" , feature = "http2" ) ) ]
136
+ InvalidConnectWithBody ,
134
137
/// Error from future of user's Service.
135
138
#[ cfg( any(
136
139
all( any( feature = "client" , feature = "server" ) , feature = "http1" ) ,
@@ -395,6 +398,11 @@ impl Error {
395
398
Error :: new_user ( User :: Body ) . with ( cause)
396
399
}
397
400
401
+ #[ cfg( all( feature = "client" , feature = "http2" ) ) ]
402
+ pub ( super ) fn new_user_invalid_connect ( ) -> Error {
403
+ Error :: new_user ( User :: InvalidConnectWithBody )
404
+ }
405
+
398
406
#[ cfg( all( any( feature = "client" , feature = "server" ) , feature = "http1" ) ) ]
399
407
pub ( super ) fn new_shutdown ( cause : std:: io:: Error ) -> Error {
400
408
Error :: new ( Kind :: Shutdown ) . with ( cause)
@@ -492,6 +500,10 @@ impl Error {
492
500
feature = "ffi"
493
501
) ) ]
494
502
Kind :: User ( User :: BodyWriteAborted ) => "user body write aborted" ,
503
+ #[ cfg( all( feature = "client" , feature = "http2" ) ) ]
504
+ Kind :: User ( User :: InvalidConnectWithBody ) => {
505
+ "user sent CONNECT request with non-zero body"
506
+ }
495
507
#[ cfg( any(
496
508
all( any( feature = "client" , feature = "server" ) , feature = "http1" ) ,
497
509
all( feature = "server" , feature = "http2" )
0 commit comments