Oops, I just realized my suggestion had a bug that doesn’t include the first chunk of data in the calculated length, should be:
Req.Response.update_private(resp, :length, byte_size(data), &(&1 + byte_size(data)))
Oops, I just realized my suggestion had a bug that doesn’t include the first chunk of data in the calculated length, should be:
Req.Response.update_private(resp, :length, byte_size(data), &(&1 + byte_size(data)))