Revert "always buffer (again)"

This reverts commit 9ffbead73d.
This commit is contained in:
Bryan Stitt 2023-10-16 19:02:25 -07:00
parent 6b28c8083b
commit 349624498f

View File

@ -257,8 +257,6 @@ where
nbytes: u64, nbytes: u64,
web3_request: &Arc<ValidatedRequest>, web3_request: &Arc<ValidatedRequest>,
) -> Web3ProxyResult<SingleResponse<T>> { ) -> Web3ProxyResult<SingleResponse<T>> {
return Ok(Self::from_bytes(response.bytes().await?)?);
/*
match response.content_length() { match response.content_length() {
// short // short
Some(len) if len <= nbytes => Ok(Self::from_bytes(response.bytes().await?)?), Some(len) if len <= nbytes => Ok(Self::from_bytes(response.bytes().await?)?),
@ -294,7 +292,6 @@ where
})) }))
} }
} }
*/
} }
fn from_bytes(buf: Bytes) -> Result<Self, serde_json::Error> { fn from_bytes(buf: Bytes) -> Result<Self, serde_json::Error> {