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

Marco Signorini commented on HTTPCLIENT-1953:
---------------------------------------------

Sorry for late response.

Chrome browser used for test.

Hit the URL [http://js.omg.neodatagroup.com/omg.js]

The first answer contains the header:

{{Cache-Control: no-cache, must-revalidate}}

The second and following requests contain the {{If-Modified-Since}}; the origin 
server answers with 304 Not modified.

 
However, using the http apache client, all requests are sent to the origin 
server without the {{If-Modified-Since}} and therefore the full content is 
always downloaded.

Attached a java file with sample code.

> HTTP Response is not cached with Cache-Control: no-cache header
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1953
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1953
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpCache
>    Affects Versions: 4.5.6
>            Reporter: Marco Signorini
>            Priority: Major
>
> When the HTTP response contains the Cache-Control: no-cache header, the 
> response should be cached and then validated against the origin server before 
> returning it.
> Now the HTTP response is never cached.
> [https://developer.mozilla.org/en-US/docs/Web/HTTP/Caching]
> [https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to