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
|
let data: Vec<Result<Bytes, Infallible>> = cached
|
||||||
.data
|
.data
|
||||||
.to_vec()
|
.to_vec()
|
||||||
.chunks(1024)
|
.chunks(1460) // TCP MSS default size
|
||||||
.map(|v| Ok(Bytes::from(v.to_vec())))
|
.map(|v| Ok(Bytes::from(v.to_vec())))
|
||||||
.collect();
|
.collect();
|
||||||
let mut resp = HttpResponse::Ok();
|
let mut resp = HttpResponse::Ok();
|
||||||
|
|
Loading…
Reference in a new issue