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

Ortwin Glück commented on HTTPCLIENT-427:
-----------------------------------------

Jon, I like your approach. 

If you don't know what to do with a request, the best thing you can do is to 
pass it on verbatim to the server, as would do the client without a cache. The 
server will know the answer. If you can't decide whether it's correct to cache 
the response or not, then don't. Better make an extra request to the server 
than deliver stale or incorrect data (especially with WebDav you can easily 
loose data).

My opinion on the case in question: The correct behaviour of a compliant server 
is undefined, especially no meaning must be implied to the returned status code 
or headers. Trying to be as transparent as possible should be the way to go 
here (trying not to break anything). So pass on the request verbatim to the 
destination and remove the resource from the cache, as you can't know what the 
server will do.



> Implement a cache to perform real request only when needed
> ----------------------------------------------------------
>
>                 Key: HTTPCLIENT-427
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-427
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>         Environment: Operating System: Linux
> Platform: PC
>            Reporter: Marc Guillemot
>            Priority: Minor
>             Fix For: Future
>
>
> Browsers may cache received content according to the values of different
> response headers. It would be great if HttpClient could do the same.

-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to