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

Michajlo Matijkiw edited comment on HTTPCLIENT-1001 at 9/29/10 12:10 PM:
-------------------------------------------------------------------------

This patch should be applied against TestCacheEntryUpdater and it exposes the 
mentioned bug.  I have started to work on a fix but was hoping for some 
feedback on my approach.

I am looking to move the logic of CacheEntryUpdater#updateCacheEntry into 
BasicHttpCache (this is the only place where it is used).  The rest of 
CacheEntryUpdater's methods can remain as helper methods.  I think this will 
simplify the logic and help prevent any code duplication.  I believe it might 
make resolving HTTPCLIENT-1003 easier as well.

Any thoughts?

Thanks,
Michajlo

      was (Author: cim_michajlomatijkiw):
    This patch should be applied against TestCacheEntryUpdater and it exposes 
the mentioned bug.  I have started to work on a fix but was hoping for some 
feedback on my approach.

I am looking to move the logic of CacheEntryUpdater#updateCacheEntry into 
BasicHttpCache (this is the only place where it is used).  The rest of 
CacheEntryUpdater's methods can remain as helper methods.  I think this will 
simplify the logic and help prevent any code duplication.  I believe it might 
make respolving HTTPCLIENT-1003 easier as well.

Any thoughts?

Thanks,
Michajlo
  
> CacheEntryUpdater does not properly update cache entry resource
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1001
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1001
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Cache
>            Reporter: Michajlo Matijkiw
>         Attachments: cache_entry_updater_bug_test.patch
>
>
> CacheEntryUpdater#updateCacheEntry() copies the old cache entry's resource, 
> though I believe it should only do so if the response is a 304.  Otherwise it 
> should take the response from the server to update the entry.  This method 
> gets called when validating a cache entry and the server returns a 200 or 304.

-- 
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