hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Moore (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1290) 304 cached response never reused with If-modified-since conditional requests
Date Mon, 07 Jan 2013 11:38:13 GMT

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1290?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13545814#comment-13545814
] 

Jon Moore commented on HTTPCLIENT-1290:
---------------------------------------

I'm not convinced this is a bug that needs to delay a release; I don't think the cache is
behaving in a non-compliant way. At the worst, it is simply forwarding a request on to the
origin instead of serving a cache entry; this isn't going to break anything from an HTTP sense.

That said, what are the cache headers on the first 304 response from the origin? That should
affect whether it (the 304 response) is itself cacheable or not. If it doesn't have a freshness
lifetime via max-age or s-max-age, doesn't have a cache validator like Last-Modified, and
a minimum cache lifetime isn't configured as an override, then this response isn't really
cacheable on its own.

Francois-Xavier: can you post a unit test showing the behavior or a wire log of the problematic
exchange?

                
> 304 cached response never reused with If-modified-since conditional requests
> ----------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1290
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1290
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Cache
>    Affects Versions: 4.2.3
>            Reporter: Francois-Xavier Bonnet
>
> Steps to reproduce the problem:
> - cache is empty
> - send a conditional If-modified-since request
> - backend server responds with a 304 Not modified (the response does not contain the
"Last-modified" header, this conforms to rfc 2616 chapter 10.3.5)
> - the response is stored in the cache
> - send another conditional If-modified-since request
> - as the cache entry does not contain a Last-modified header to match with the If-modified-since
request header, the cache considers the entry cannot be used and sends a request again to
the backend server

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message