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] [Commented] (HTTPCLIENT-1515) Caching responses to HEAD requests
Date Wed, 08 Oct 2014 08:52:34 GMT

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

Francois-Xavier Bonnet commented on HTTPCLIENT-1515:
----------------------------------------------------

I have been testing this change. It works fine, however it does not pass the clirr:check due
to the changes to the signatures of the constructors of org.apache.http.client.cache.HttpCacheEntry

I have been thinking about some solutions that would not require to store the request method
in the cache entry so that we don't have to change the signatures:
1) put an empty entity in the cache if the request method is GET and there is no entity, null
if the method is HEAD
2) before reusing a cache entry for a GET request, check if the content-length is consistent
with the cached entity

Your opinion?

> Caching responses to HEAD requests
> ----------------------------------
>
>                 Key: HTTPCLIENT-1515
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1515
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpCache
>            Reporter: Tyrone Cutajar
>             Fix For: 4.4 Final
>
>
> Our system retrieves metadata via HEAD requests using HTTP Client 4.x and would benefit
immensely from having the headers in the response cached.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message