Search squid archive

Squid sends conflicting headers to origin when If-Unmodified-Since header is present from client

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I have to modify the behavior of a customized version of Squid 2.4
STABLE6 code, either by configuration or by coding.  Currently I can
not switch to any other Squid version, because of the customizations.


Problem description:

- When a client sends a byte-range request with an If-Unmodified-Since
header AND the object in Squid's cache is stale, then this Squid
version generates a request to origin with both IUMS and IMS headers,
which is conflicting and undefined by RFC2616.  The origin throws an
error.


Proposed solution:

- On an IMS check for a content that was requested with a UIMS header,
Squid should only insert the IMS header, not the IUMS header. (If
only the IUMS header was added, then the origin would return origin
content unnecessarily, since it hasn't changed from the the cached
version.)

- Once the origin check is complete, then Squid cache should compute
IUMS calculations as defined in RFC2616, returning possibly a 206
Partial or 412 precondition failed.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html


Questions:

- Is there any possibility to facilitate such behavior using Squid 2.4
STABLE6 configuration?

- If not, then where in the code should I start to look to make the
necessary code change, and approximately how?

- I could not find any notion of If-Unmodified-Since in the Squid 2.4
STABLE6 code.  What's the best way to handle this?



[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux