use TCP MSS as chunk size
This commit is contained in:
parent
46eec93773
commit
cf82aedb12
1 changed files with 1 additions and 1 deletions
|
@ -250,7 +250,7 @@ fn construct_response(cached: &CachedImage) -> ServerResponse {
|
|||
let data: Vec<Result<Bytes, Infallible>> = cached
|
||||
.data
|
||||
.to_vec()
|
||||
.chunks(1024)
|
||||
.chunks(1460) // TCP MSS default size
|
||||
.map(|v| Ok(Bytes::from(v.to_vec())))
|
||||
.collect();
|
||||
let mut resp = HttpResponse::Ok();
|
||||
|
|
Loading…
Reference in a new issue