hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Moore (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HTTPCLIENT-965) cache does not honor must-revalidate or proxy-revalidate Cache-Control directives
Date Fri, 02 Jul 2010 17:05:50 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-965?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Jonathan Moore updated HTTPCLIENT-965:

    Attachment: must-revalidate.patch

The provided patch fixes this issue by adding 'max-age=0' to revalidations for these directives
and generating a 504 if there is an IOException when attempting to revalidate a stale entry.

There is a related issue:

where it is not currently clear if the cache is a shared cache or not. The conservative assumption
here is that we are a
shared cache, and hence must-revalidate and proxy-revalidate are essentially the same.

However, the unit tests for proxy-revalidate in TestProtocolRequirements are conditional on
whether the CachingHttpClient claims to be a shared cache or not.

This patch is contributed to the ASF with the permission of my employer.

> cache does not honor must-revalidate or proxy-revalidate Cache-Control directives
> ---------------------------------------------------------------------------------
>                 Key: HTTPCLIENT-965
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-965
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 4.1 Alpha2
>            Reporter: Jonathan Moore
>         Attachments: must-revalidate.patch
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.9.4
> There are a couple of missed requirements here regarding must-revalidate and proxy-revalidate
(which applies only to shared caches).
> 1. When a cache entry with this directive is revalidated, it must be an end-to-end revalidation
(meaning it must include 'max-age=0' on the request).
> 2. If the revalidation with the origin fails, the cache MUST NOT return a stale entry
and MUST return a 504 response.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message