[squid-dev] Questionable default 'range_offset_limit ' option

Joshua Rogers jrogers at opera.com
Fri Mar 19 12:04:42 UTC 2021


Makes sense!

Thank you for the explanation.

On Fri, Mar 19, 2021 at 12:46 PM Amos Jeffries <squid3 at treenet.co.nz> wrote:

> On 19/03/21 6:13 pm, Joshua Rogers wrote:
> > Hi there,
> >
> >
> > According to http://www.squid-cache.org/Doc/config/range_offset_limit/
> > <http://www.squid-cache.org/Doc/config/range_offset_limit/>,
> > 'range_offset_limit' is by default 'none'.
> >
>
> This directive is an access control like http_access, but instead of
> doing an allow/deny action is sets a limit (or not) on any matching
> transactions.
>
> The 'none' value prevents this directive setting a limit. For example;
> to apply a 5KB limit on Internet visitors, a 10KB limit on LAN clients,
> and no limit on localhost traffic would look like this:
>
>    range_offset_limit none localhost
>    range_offset_limit 10 KB localnet
>    range_offset_limit 5 KB
> (there is an implicit 'all' if you don't specify any ACLs to match)
>
>
> So the default for this directive - if you don't configure any
> range_offset_limit lines at all. Is not to set/force a limit.
>
>
>
> > However in HttpRequest.cc, it says it is by default 0:
> > rangeOffsetLimit = 0; // default value for rangeOffsetLimit
> >
>
> HttpRequest::rangeOffsetLimit is the limit actually being use on one
> specific transaction.
>
> The default here is 0 bytes. Meaning disabled. Only the bytes requested
> by the client will be fetched. "range_offset_limit none" means that this
> non-limit will stay unchanged.
>
>
> > and then in HttpHdrRange.cc:
> >      if (limit == 0)
> >          /* 0 == disabled */
> >          return true;
> >
> >      if (-1 == limit)
> >          /* 'none' == forced */
> >          return false;
> >
> >
> > So is 'none' -1, or 0 in this case?:)
> >
>
> "none" has different values depending on what type of thing it is the
> value of.
>
>
> Amos
> _______________________________________________
> squid-dev mailing list
> squid-dev at lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-dev/attachments/20210319/45fcc5e6/attachment.htm>


More information about the squid-dev mailing list