hc-dev mailing list archives

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

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

Francois-Xavier Bonnet updated HTTPCLIENT-1290:
-----------------------------------------------

    Attachment: HTTPCLIENT-1290.txt

Here is a unit test.

In addition, I have been able to reproduce the problem on real servers:
- Apache 2.2 with mod_expires activated on php pages -> cache miss each time
- Apache 2.2 with mod_expires activated on static files -> cache revalidation each time
(thanks to e-tag header)
- Apache 2.2 with Varnish 1.1 -> Varnish sends a Last-Modified header with 304 responses
(which is not compliant with the specification) but method org.apache.http.impl.client.cache.ResponseProtocolCompliance.ensure304DoesNotContainExtraEntityHeaders(HttpResponse)
removes the header from the response so the result is the same.
                
> 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
>         Attachments: HTTPCLIENT-1290.txt
>
>
> 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