Support very large headers
This completely refactors how headers are hpack-encoded. Instead of trying to be clever, constructing frames on the go while hpack-encoding, we just make a blob of all the hpack-encoded headers first, and then we split that blob in as many frames as necessary.
This commit is contained in:
committed by
Sean McArthur
parent
e9a13700cb
commit
61b4f8fc34
@@ -133,10 +133,6 @@ impl Send {
|
||||
|
||||
Self::check_headers(frame.fields())?;
|
||||
|
||||
if frame.has_too_big_field() {
|
||||
return Err(UserError::HeaderTooBig);
|
||||
}
|
||||
|
||||
let end_stream = frame.is_end_stream();
|
||||
|
||||
// Update the state
|
||||
@@ -270,10 +266,6 @@ impl Send {
|
||||
return Err(UserError::UnexpectedFrameType);
|
||||
}
|
||||
|
||||
if frame.has_too_big_field() {
|
||||
return Err(UserError::HeaderTooBig);
|
||||
}
|
||||
|
||||
stream.state.send_close();
|
||||
|
||||
tracing::trace!("send_trailers -- queuing; frame={:?}", frame);
|
||||
|
||||
Reference in New Issue
Block a user