You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2020/05/17 21:02:43 UTC

[maven-wagon] 01/01: [WAGON-595] Add configuration property 'http.protocol.handle-content-compression'

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch WAGON-595
in repository https://gitbox.apache.org/repos/asf/maven-wagon.git

commit 8882fa12426e9db9f2e94cafa363985941a4a227
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun May 17 23:01:36 2020 +0200

    [WAGON-595] Add configuration property 'http.protocol.handle-content-compression'
---
 .../java/org/apache/maven/wagon/shared/http/ConfigurationUtils.java  | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/ConfigurationUtils.java b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/ConfigurationUtils.java
index dede158..a825df1 100755
--- a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/ConfigurationUtils.java
+++ b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/ConfigurationUtils.java
@@ -54,6 +54,7 @@ public class ConfigurationUtils
     private static final String MAX_REDIRECTS               = "http.protocol.max-redirects";
     private static final String HANDLE_REDIRECTS            = "http.protocol.handle-redirects";
     private static final String REJECT_RELATIVE_REDIRECT    = "http.protocol.reject-relative-redirect";
+    private static final String HANDLE_CONTENT_COMPRESSION  = "http.protocol.handle-content-compression";
     // TODO Add contentCompressionEnabled and normalizeUri
 
     private static final String COERCE_PATTERN = "%(\\w+),(.+)";
@@ -150,6 +151,10 @@ public class ConfigurationUtils
                 {
                     builder.setRelativeRedirectsAllowed( !Boolean.valueOf( value ) );
                 }
+                else if ( key.equals ( HANDLE_CONTENT_COMPRESSION ) )
+                {
+                    builder.setContentCompressionEnabled( Boolean.valueOf( value ) );
+                }
             }
         }
     }