add comment
This commit is contained in:
parent
cdcb1b13da
commit
d473b44556
2 changed files with 6 additions and 1 deletions
|
|
@ -74,10 +74,15 @@ where
|
|||
return res.map(wrap_incoming_body_response::<BoxBody>);
|
||||
};
|
||||
let (parts, body) = res.unwrap().into_parts();
|
||||
|
||||
let Ok(bytes) = body.collect().await.map(|v| v.to_bytes()) else {
|
||||
return Err(RpxyError::FailedToWriteByteBufferForCache);
|
||||
};
|
||||
|
||||
// TODO: this is inefficient. needs to be reconsidered to avoid unnecessary copy and should spawn async task to store cache.
|
||||
// We may need to use the same logic as h3.
|
||||
// Is bytes.clone() enough?
|
||||
|
||||
// if let Err(cache_err) = self
|
||||
// .cache
|
||||
// .as_ref()
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ where
|
|||
size += body.remaining();
|
||||
if size > max_body_size {
|
||||
error!(
|
||||
"Exceeds max request body size for HTTP/3: received {}, maximum_allowd {}",
|
||||
"Exceeds max request body size for HTTP/3: received {}, maximum_allowed {}",
|
||||
size, max_body_size
|
||||
);
|
||||
return Err(RpxyError::H3TooLargeBody);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue