File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ impl HttpDate {
66
66
}
67
67
68
68
fn err ( msg : & ' static str ) -> Error {
69
- Error :: new_from_str ( ErrorKind :: InvalidData , msg, StatusCode :: InternalServerError )
69
+ Error :: new_from_str ( ErrorKind :: InvalidData , msg, StatusCode :: BadRequest )
70
70
}
71
71
72
72
fn parse_imf_fixdate ( s : & [ u8 ] ) -> Result < HttpDate , Error > {
Original file line number Diff line number Diff line change @@ -362,8 +362,7 @@ where
362
362
// Convert our header buf into an httparse instance, and validate.
363
363
let status = httparse_req. parse ( & buf) ?;
364
364
365
- let err =
366
- |msg| Error :: new_from_str ( ErrorKind :: InvalidData , msg, StatusCode :: InternalServerError ) ;
365
+ let err = |msg| Error :: new_from_str ( ErrorKind :: InvalidData , msg, StatusCode :: BadRequest ) ;
367
366
368
367
if status. is_partial ( ) {
369
368
return Err ( err ( "Malformed HTTP head" ) ) ;
You can’t perform that action at this time.
0 commit comments