Hi Fred,

On Tue, Oct 23, 2018 at 02:57:05PM +0200, Frederic Lecaille wrote:
> Hello ML,
> 
> Here is a serie of patches to make the cache capable of caching HTTP
> objects larger than a buffer.
> 
> The 4th patch add "max-object-size" option to "cache" section so that
> to limit the size of the HTTP objects to be cached.
> 
> Do not hesitate to test them.

Great, thanks, now applied!

I'm just having one concern I'd like you to take a look at. The
max-object-size and the "sent" argument are respectively unsigned int
and int, while the response's body_len is an uint64_t. Thus I have no
idea what happens when :
  - max-object-size >= 2 GB is set
  - content-length >= 2 GB or >= 4 GB is seen
  - the sum of received chunks is larger than 2 GB

I'm personally fine if all of these result in the object not being cached
(in which case it should be mentioned in the doc), but I'd like to be sure
we don't return truncated/corrupted objects and that we don't leak cache
entries or any such thing.

Thanks!
Willy

Reply via email to