You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by GitBox <gi...@apache.org> on 2019/07/27 10:44:23 UTC

[GitHub] [httpcomponents-client] ok2c commented on a change in pull request #157: Make Accept-Encoding header handling thread-safe

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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org