reset stream if invalid content-length received
This commit is contained in:
@@ -152,9 +152,10 @@ where
|
|||||||
if let Some(content_length) = frame.fields().get(header::CONTENT_LENGTH) {
|
if let Some(content_length) = frame.fields().get(header::CONTENT_LENGTH) {
|
||||||
let content_length = match parse_u64(content_length.as_bytes()) {
|
let content_length = match parse_u64(content_length.as_bytes()) {
|
||||||
Ok(v) => v,
|
Ok(v) => v,
|
||||||
Err(_) => {
|
Err(_) => return Err(RecvError::Stream {
|
||||||
unimplemented!();
|
id: stream.id,
|
||||||
},
|
reason: Reason::ProtocolError,
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
|
|
||||||
stream.content_length = ContentLength::Remaining(content_length);
|
stream.content_length = ContentLength::Remaining(content_length);
|
||||||
|
|||||||
Reference in New Issue
Block a user