maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From micha...@apache.org
Subject [2/5] maven-wagon git commit: [WAGON-476] HTTP Provider follows redirects on PUT and may change request method
Date Wed, 28 Dec 2016 00:29:57 GMT
[WAGON-476] HTTP Provider follows redirects on PUT and may change request method


Project: http://git-wip-us.apache.org/repos/asf/maven-wagon/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-wagon/commit/0d560b9e
Tree: http://git-wip-us.apache.org/repos/asf/maven-wagon/tree/0d560b9e
Diff: http://git-wip-us.apache.org/repos/asf/maven-wagon/diff/0d560b9e

Branch: refs/heads/jetty-8
Commit: 0d560b9e4bd230b49daa948980a4284bb997a5ca
Parents: a66be46
Author: Michael Osipov <michaelo@apache.org>
Authored: Mon Dec 26 00:57:24 2016 +0100
Committer: Michael Osipov <michaelo@apache.org>
Committed: Tue Dec 27 23:07:49 2016 +0100

----------------------------------------------------------------------
 .../maven/wagon/providers/http/AbstractHttpClientWagon.java     | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-wagon/blob/0d560b9e/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/AbstractHttpClientWagon.java
----------------------------------------------------------------------
diff --git a/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/AbstractHttpClientWagon.java
b/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/AbstractHttpClientWagon.java
index a03558a..7773d97 100755
--- a/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/AbstractHttpClientWagon.java
+++ b/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/AbstractHttpClientWagon.java
@@ -792,6 +792,11 @@ public abstract class AbstractHttpClientWagon
             }
         }
 
+        if ( httpMethod instanceof HttpPut )
+        {
+            requestConfigBuilder.setRedirectsEnabled( false );
+        }
+
         localContext.setRequestConfig( requestConfigBuilder.build() );
 
         if ( config != null && config.isUsePreemptive() )


Mime
View raw message