ok2c commented on a change in pull request #157: Make Accept-Encoding header 
handling thread-safe
URL: 
https://github.com/apache/httpcomponents-client/pull/157#discussion_r307961564
 
 

 ##########
 File path: 
httpclient5/src/main/java/org/apache/hc/client5/http/impl/classic/ContentCompressionExec.java
 ##########
 @@ -70,16 +71,20 @@
 @Internal
 public final class ContentCompressionExec implements ExecChainHandler {
 
-    private final String[] acceptEncoding;
+    private final Header acceptEncoding;
     private final Lookup<InputStreamFactory> decoderRegistry;
     private final boolean ignoreUnknown;
 
     public ContentCompressionExec(
             final List<String> acceptEncoding,
             final Lookup<InputStreamFactory> decoderRegistry,
             final boolean ignoreUnknown) {
-        this.acceptEncoding = acceptEncoding != null ? acceptEncoding.toArray(
-                new String[acceptEncoding.size()]) : new String[] {"gzip", 
"x-gzip", "deflate"};
+        // MessageSupport.format is not thread-safe, because it sorts the
 
 Review comment:
   @coxlinton I will fix `MessageSupport#format` in HttpCore master. Do you 
mind dropping the comment about `MessageSupport#format` thread safety from this 
change-set?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to