Github user ok2c commented on a diff in the pull request:

    
https://github.com/apache/httpcomponents-client/pull/91#discussion_r161406549
  
    --- Diff: 
httpclient-cache/src/main/java/org/apache/http/impl/client/cache/CacheEntryUpdater.java
 ---
    @@ -103,6 +103,8 @@ public HttpCacheEntry updateCacheEntry(
     
         protected Header[] mergeHeaders(final HttpCacheEntry entry, final 
HttpResponse response) {
     
    +        // since we do not expect a content in the response, remove any 
related headers if exists
    +        response.removeHeaders(HTTP.CONTENT_ENCODING);
    --- End diff --
    
    @catchsudheera Sudheera, can we avoid mutation of the original response 
message? It would be cleaner to ignore this header when copying updated headers 
from the response message instead of deleting it from the original message 
itself. To make things easier you might want to port `mergeHeaders` method from 
master
    
https://github.com/apache/httpcomponents-client/blob/master/httpclient5-cache/src/main/java/org/apache/hc/client5/http/impl/cache/CacheUpdateHandler.java#L139


---

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

Reply via email to