check for overly large header field in send_headers

This commit is contained in:
Sean McArthur
2019-05-29 14:40:28 -07:00
parent e512b6ccb6
commit 91819bf25e
5 changed files with 63 additions and 2 deletions

View File

@@ -85,6 +85,10 @@ impl Send {
}
}
if frame.has_too_big_field() {
return Err(UserError::HeaderTooBig);
}
let end_stream = frame.is_end_stream();
// Update the state
@@ -216,6 +220,10 @@ impl Send {
return Err(UserError::UnexpectedFrameType);
}
if frame.has_too_big_field() {
return Err(UserError::HeaderTooBig);
}
stream.state.send_close();
trace!("send_trailers -- queuing; frame={:?}", frame);