diff --git a/.asf.yaml b/.asf.yaml
new file mode 100644
index 0000000..eae98a2
--- /dev/null
+++ b/.asf.yaml
@@ -0,0 +1,26 @@
+# 
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+# 
+#       http://www.apache.org/licenses/LICENSE-2.0
+# 
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+#
+# see https://s.apache.org/asfyaml
+github:
+  description: "Apache Maven Wagon"
+  homepage: https://maven.apache.org/wagon/
+  labels:
+    - java
+    - build-management
+    - maven-plugins
+    - maven-wagon
+    - maven
diff --git a/Jenkinsfile b/Jenkinsfile
index 09ac70f..12681d8 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -17,4 +17,4 @@
  * under the License.
  */
 
-asfMavenTlpStdBuild()
+asfMavenTlpStdBuild([tmpWs:true])
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..32b2002
--- /dev/null
+++ b/README.md
@@ -0,0 +1,100 @@
+<!---
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+Contributing to [Apache Maven Wagon](https://maven.apache.org/wagon/)
+======================
+
+[![ASF Jira](https://img.shields.io/endpoint?url=https%3A%2F%2Fmaven.apache.org%2Fbadges%2Fasf_jira-WAGON.json)][jira]
+[![Apache License, Version 2.0, January 2004](https://img.shields.io/github/license/apache/maven.svg?label=License)][license]
+[![Maven Central](https://img.shields.io/maven-central/v/org.apache.maven.wagon/wagon.svg?label=Maven%20Central)](https://search.maven.org/artifact/org.apache.maven.wagon/wagon)
+[![Reproducible Builds](https://img.shields.io/badge/Reproducible_Builds-ok-green?labelColor=blue)](https://github.com/jvm-repo-rebuild/reproducible-central#org.apache.maven.wagon:wagon)
+[![Jenkins Status](https://img.shields.io/jenkins/s/https/ci-maven.apache.org/job/Maven/job/maven-box/job/maven-wagon/job/master.svg)][build]
+[![Jenkins tests](https://img.shields.io/jenkins/t/https/ci-maven.apache.org/job/Maven/job/maven-box/job/maven-wagon/job/master.svg)][test-results]
+
+
+You have found a bug or you have an idea for a cool new feature? Contributing
+code is a great way to give something back to the open source community. Before
+you dig right into the code, there are a few guidelines that we need
+contributors to follow so that we can have a chance of keeping on top of
+things.
+
+Getting Started
+---------------
+
++ Make sure you have a [JIRA account](https://issues.apache.org/jira/).
++ Make sure you have a [GitHub account](https://github.com/signup/free).
++ If you're planning to implement a new feature, it makes sense to discuss your changes 
+  on the [dev list][ml-list] first. 
+  This way you can make sure you're not wasting your time on something that isn't 
+  considered to be in Apache Maven's scope.
++ Submit a ticket for your issue, assuming one does not already exist.
+  + Clearly describe the issue, including steps to reproduce when it is a bug.
+  + Make sure you fill in the earliest version that you know has the issue.
++ Fork the repository on GitHub.
+
+Making and Submitting Changes
+--------------
+
+We accept Pull Requests via GitHub. The [developer mailing list][ml-list] is the
+main channel of communication for contributors.  
+There are some guidelines which will make applying PRs easier for us:
++ Create a topic branch from where you want to base your work (this is usually the master branch).
+  Push your changes to a topic branch in your fork of the repository.
++ Make commits of logical units.
++ Respect the original code style: by using the same [codestyle][code-style],
+  patches should only highlight the actual difference, not being disturbed by any formatting issues:
+  + Only use spaces for indentation.
+  + Create minimal diffs - disable on save actions like reformat source code or organize imports. 
+    If you feel the source code should be reformatted, create a separate PR for this change.
+  + Check for unnecessary whitespace with `git diff --check` before committing.
++ Make sure your commit messages are in the proper format. Your commit message should contain the key of the JIRA issue.
+```
+[WAGON-XXX] - Subject of the JIRA Ticket
+ Optional supplemental description.
+```
++ Make sure you have added the necessary tests (JUnit/IT) for your changes.
++ Run all the tests with `mvn -Prun-its verify` to assure nothing else was accidentally broken.
++ Submit a pull request to the repository in the Apache organization.
++ Update your JIRA ticket and include a link to the pull request in the ticket.
+
+If you plan to contribute on a regular basis, please consider filing a [contributor license agreement][cla].
+
+Making Trivial Changes
+----------------------
+
+For changes of a trivial nature to comments and documentation, it is not always
+necessary to create a new ticket in JIRA.  In this case, it is appropriate to
+start the first line of a commit with '(doc)' instead of a ticket number.
+
+Additional Resources
+--------------------
+
++ [Contributing patches](https://maven.apache.org/guides/development/guide-maven-development.html#Creating_and_submitting_a_patch)
++ [Apache Maven wagon JIRA project page][jira]
++ [Contributor License Agreement][cla]
++ [General GitHub documentation](https://help.github.com/)
++ [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
++ [Apache Maven Twitter Account](https://twitter.com/ASFMavenProject)
++ #Maven IRC channel on freenode.org
+
+[jira]: https://issues.apache.org/jira/projects/WAGON/
+[license]: https://www.apache.org/licenses/LICENSE-2.0
+[ml-list]: https://maven.apache.org/mailing-lists.html
+[code-style]: https://maven.apache.org/developers/conventions/code.html
+[cla]: https://www.apache.org/licenses/#clas
+[maven-wiki]: https://cwiki.apache.org/confluence/display/MAVEN/Index
+[test-results]: https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-wagon/job/master/lastCompletedBuild/testReport/
+[build]: https://ci-maven.apache.org/job/Maven/job/maven-box/job/maven-wagon/job/master/
diff --git a/pom.xml b/pom.xml
index 9b1c88f..f631b95 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,13 +23,12 @@ under the License.
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven-parent</artifactId>
-    <version>33</version>
-    <relativePath>../pom/maven/pom.xml</relativePath>
+    <version>34</version>
   </parent>
 
   <groupId>org.apache.maven.wagon</groupId>
   <artifactId>wagon</artifactId>
-  <version>3.3.4</version>
+  <version>3.5.1</version>
   <packaging>pom</packaging>
 
   <name>Apache Maven Wagon</name>
@@ -39,10 +38,10 @@ under the License.
 
   <properties>
     <maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
-    <slf4jVersion>1.7.25</slf4jVersion>
+    <slf4jVersion>1.7.32</slf4jVersion>
     <maven.site.path>wagon-archives/wagon-LATEST</maven.site.path>
-    <maven.compiler.source>1.7</maven.compiler.source>
-    <maven.compiler.target>1.7</maven.compiler.target>
+    <javaVersion>7</javaVersion>
+    <project.build.outputTimestamp>2021-12-22T22:40:17Z</project.build.outputTimestamp>
   </properties>
 
   <contributors>
@@ -200,7 +199,7 @@ under the License.
     <connection>scm:git:https://gitbox.apache.org/repos/asf/maven-wagon.git</connection>
     <developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-wagon.git</developerConnection>
     <url>https://github.com/apache/maven-wagon/tree/${project.scm.tag}</url>
-    <tag>wagon-3.3.4</tag>
+    <tag>wagon-3.5.1</tag>
   </scm>
 
   <issueManagement>
@@ -209,7 +208,7 @@ under the License.
   </issueManagement>
   <ciManagement>
     <system>Jenkins</system>
-    <url>https://builds.apache.org/job/maven-box/job/maven-wagon/</url>
+    <url>https://ci-builds.apache.org/job/Maven/job/maven-box/job/maven-wagon/</url>
   </ciManagement>
 
   <distributionManagement>
@@ -251,12 +250,12 @@ under the License.
       <dependency>
         <groupId>junit</groupId>
         <artifactId>junit</artifactId>
-        <version>4.12</version>
+        <version>4.13.2</version>
       </dependency>
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-interactivity-api</artifactId>
-        <version>1.0</version>
+        <version>1.1</version>
         <exclusions>
           <exclusion>
             <groupId>plexus</groupId>
@@ -275,12 +274,12 @@ under the License.
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-container-default</artifactId>
-        <version>1.7.1</version>
+        <version>2.1.0</version>
       </dependency>
       <dependency>
         <groupId>org.codehaus.plexus</groupId>
         <artifactId>plexus-utils</artifactId>
-        <version>3.2.0</version>
+        <version>3.3.0</version>
       </dependency>
 
       <!-- for slf4j -->
@@ -329,10 +328,15 @@ under the License.
   <build>
     <pluginManagement>
       <plugins>
+        <plugin><!-- TODO remove when parent POM upgraded to 35 -->
+          <groupId>org.apache.maven.plugins</groupId>
+          <artifactId>maven-shade-plugin</artifactId>
+          <version>3.2.3</version>
+        </plugin>
         <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.20</version>
+          <version>2.22.2</version>
           <configuration>
             <forkedProcessTimeoutInSeconds>800</forkedProcessTimeoutInSeconds>
             <systemPropertyVariables>
@@ -460,7 +464,7 @@ under the License.
               <failOnError>false</failOnError>
               <linksource>true</linksource>
               <links>
-                <link>http://java.sun.com/j2ee/1.4/docs/api</link>
+                <link>https://docs.oracle.com/javaee/1.4/api/</link>
                 <link>http://commons.apache.org/collections/apidocs-COLLECTIONS_3_0/</link>
                 <link>http://commons.apache.org/logging/apidocs/</link>
                 <link>http://commons.apache.org/pool/apidocs/</link>
diff --git a/src/site/xdoc/index.xml b/src/site/xdoc/index.xml
index 88c3c6b..ba34dc6 100644
--- a/src/site/xdoc/index.xml
+++ b/src/site/xdoc/index.xml
@@ -35,9 +35,9 @@
 
       <p>Maven Wagon is a transport abstraction that is used in Maven's artifact and
  repository handling code.</p>
- 
+
       <p>Wagon defines a <a href="./wagon-provider-api/">unified API</a>, and it currently has the following providers:</p>
-      <ul> 
+      <ul>
        <li><a href="./wagon-providers/wagon-file/">File</a></li>
        <li><a href="./wagon-providers/wagon-http/">HTTP</a></li>
        <li><a href="./wagon-providers/wagon-http-lightweight/">HTTP lightweight</a></li>
@@ -74,6 +74,19 @@
 
     </section>
 
+    <section name="Deprecation Notice">
+
+        <p>The following Wagon providers are deprecated and will be removed in version 4.0.0:</p>
+          <ul>
+           <li><a href="./wagon-providers/wagon-http-lightweight/">HTTP lightweight</a></li>
+           <li><a href="./wagon-providers/wagon-ftp/">FTP</a></li>
+           <li><a href="./wagon-providers/wagon-ssh/">SSH/SCP</a></li>
+           <li><a href="./wagon-providers/wagon-webdav-jackrabbit/">WebDAV</a></li>
+          </ul>
+
+      </section>
+
+
   </body>
 
 </document>
diff --git a/wagon-provider-api/pom.xml b/wagon-provider-api/pom.xml
index d611c27..0f5c760 100644
--- a/wagon-provider-api/pom.xml
+++ b/wagon-provider-api/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
diff --git a/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java b/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java
index 95ad47e..25e4a36 100644
--- a/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java
+++ b/wagon-provider-api/src/main/java/org/apache/maven/wagon/AbstractWagon.java
@@ -42,6 +42,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
+import java.nio.Buffer;
 import java.nio.ByteBuffer;
 import java.nio.channels.Channels;
 import java.nio.channels.ReadableByteChannel;
@@ -599,28 +600,29 @@ protected void transfer( Resource resource, InputStream input, OutputStream outp
             if ( read == -1 )
             {
                 // EOF, but some data has not been written yet.
-                if ( buffer.position() != 0 )
+                if ( ( (Buffer) buffer ).position() != 0 )
                 {
-                    buffer.flip();
-                    fireTransferProgress( transferEvent, buffer.array(), buffer.limit() );
-                    output.write( buffer.array(), 0, buffer.limit() );
+                    ( (Buffer) buffer ).flip();
+                    fireTransferProgress( transferEvent, buffer.array(), ( (Buffer) buffer ).limit() );
+                    output.write( buffer.array(), 0, ( (Buffer) buffer ).limit() );
+                    ( (Buffer) buffer ).clear();
                 }
 
                 break;
             }
 
-            // Prevent minichunking / fragmentation: when less than half the buffer is utilized,
+            // Prevent minichunking/fragmentation: when less than half the buffer is utilized,
             // read some more bytes before writing and firing progress.
-            if ( buffer.position() < halfBufferCapacity )
+            if ( ( (Buffer) buffer ).position() < halfBufferCapacity )
             {
                 continue;
             }
 
-            buffer.flip();
-            fireTransferProgress( transferEvent, buffer.array(), buffer.limit() );
-            output.write( buffer.array(), 0, buffer.limit() );
-            remaining -= buffer.limit();
-            buffer.clear();
+            ( (Buffer) buffer ).flip();
+            fireTransferProgress( transferEvent, buffer.array(), ( (Buffer) buffer ).limit() );
+            output.write( buffer.array(), 0, ( (Buffer) buffer ).limit() );
+            remaining -= ( (Buffer) buffer ).limit();
+            ( (Buffer) buffer ).clear();
         }
         output.flush();
     }
diff --git a/wagon-provider-api/src/main/java/org/apache/maven/wagon/observers/Debug.java b/wagon-provider-api/src/main/java/org/apache/maven/wagon/observers/Debug.java
index 521043a..fad2287 100644
--- a/wagon-provider-api/src/main/java/org/apache/maven/wagon/observers/Debug.java
+++ b/wagon-provider-api/src/main/java/org/apache/maven/wagon/observers/Debug.java
@@ -138,8 +138,6 @@ public void transferStarted( final TransferEvent transferEvent )
                 + transferEvent.getWagon().getRepository().getUrl();
 
             out.println( message );
-
-            out.println( "" );
         }
         else
         {
@@ -148,8 +146,6 @@ public void transferStarted( final TransferEvent transferEvent )
 
             out.println( message );
 
-            out.println( "" );
-
         }
     }
 
diff --git a/wagon-provider-api/src/site/apt/index.apt b/wagon-provider-api/src/site/apt/index.apt
index af2b67c..c85d1cf 100644
--- a/wagon-provider-api/src/site/apt/index.apt
+++ b/wagon-provider-api/src/site/apt/index.apt
@@ -29,10 +29,7 @@
 Maven Wagon API
 
  The Wagon API component defines {{{./apidocs/}a simple API}} for transferring resources
- (artifacts) to and from repositories. The word repository is used in this context as
- it is commonly used in
- {{{http://maven.apache.org/maven-1.x/reference/glossary.html}Maven}}
- and means a storage of artifacts.
+ (artifacts) to and from repositories.
 
  It is also used to deploy the Maven generated site to a server.
 
diff --git a/wagon-provider-test/pom.xml b/wagon-provider-test/pom.xml
index 4a741a2..03ec46c 100644
--- a/wagon-provider-test/pom.xml
+++ b/wagon-provider-test/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
diff --git a/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java b/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java
index a1b9a45..937f37e 100644
--- a/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java
+++ b/wagon-provider-test/src/main/java/org/apache/maven/wagon/WagonTestCase.java
@@ -32,6 +32,7 @@
 import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.util.FileUtils;
 import org.easymock.IAnswer;
+import org.junit.Assume;
 
 // CHECKSTYLE_OFF: AvoidStarImport
 import static org.easymock.EasyMock.*;
@@ -768,30 +769,40 @@ public void testWagonGetFileList()
 
         wagon.connect( testRepository, getAuthInfo() );
 
-        List<String> list = wagon.getFileList( dirName );
-        assertNotNull( "file list should not be null.", list );
-        assertTrue( "file list should contain more items (actually contains '" + list + "').",
-                    list.size() >= filenames.length );
-
-        for ( String filename : filenames )
+        try
         {
-            assertTrue( "Filename '" + filename + "' should be in list.", list.contains( filename ) );
-        }
+            List<String> list = wagon.getFileList( dirName );
+            assertNotNull( "file list should not be null.", list );
+            assertTrue( "file list should contain more items (actually contains '" + list + "').",
+                        list.size() >= filenames.length );
 
-        // WAGON-250
-        list = wagon.getFileList( "" );
-        assertNotNull( "file list should not be null.", list );
-        assertTrue( "file list should contain items (actually contains '" + list + "').", !list.isEmpty() );
-        assertTrue( list.contains( "file-list/" ) );
-        assertFalse( list.contains( "file-list" ) );
-        assertFalse( list.contains( "." ) );
-        assertFalse( list.contains( ".." ) );
-        assertFalse( list.contains( "./" ) );
-        assertFalse( list.contains( "../" ) );
+            for ( String filename : filenames )
+            {
+                assertTrue( "Filename '" + filename + "' should be in list.", list.contains( filename ) );
+            }
 
-        wagon.disconnect();
+            // WAGON-250
+            list = wagon.getFileList( "" );
+            assertNotNull( "file list should not be null.", list );
+            assertTrue( "file list should contain items (actually contains '" + list + "').", !list.isEmpty() );
+            assertTrue( list.contains( "file-list/" ) );
+            assertFalse( list.contains( "file-list" ) );
+            assertFalse( list.contains( "." ) );
+            assertFalse( list.contains( ".." ) );
+            assertFalse( list.contains( "./" ) );
+            assertFalse( list.contains( "../" ) );
+        }
+        catch ( UnsupportedOperationException e )
+        {
+            // Some providers don't support this
+            Assume.assumeFalse( false );
+        }
+        finally
+        {
+            wagon.disconnect();
 
-        tearDownWagonTestingFixtures();
+            tearDownWagonTestingFixtures();
+        }
     }
 
     /**
@@ -822,6 +833,11 @@ public void testWagonGetFileListWhenDirectoryDoesNotExist()
         {
             // expected
         }
+        catch ( UnsupportedOperationException e )
+        {
+            // Some providers don't support this
+            Assume.assumeFalse( false );
+        }
         finally
         {
             wagon.disconnect();
diff --git a/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java b/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java
index a90f8f4..19765a3 100644
--- a/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java
+++ b/wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java
@@ -59,6 +59,7 @@
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+
 import java.io.ByteArrayOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -152,27 +153,15 @@ protected void tearDownWagonTestingFixtures()
         server.stop();
     }
 
-    public void testWagonGetFileList()
-        throws Exception
-    {
-        File dir = getRepositoryDirectory();
-        FileUtils.deleteDirectory( dir );
-
-        File f = new File( dir, "file-list" );
-        f.mkdirs();
-
-        super.testWagonGetFileList();
-    }
-
     public void testHttpHeaders()
         throws Exception
     {
-        Properties properties = new Properties();
-        properties.setProperty( "User-Agent", "Maven-Wagon/1.0" );
+        Properties headers = new Properties();
+        headers.setProperty( "User-Agent", "Maven-Wagon/1.0" );
 
         StreamingWagon wagon = (StreamingWagon) getWagon();
 
-        setHttpHeaders( wagon, properties );
+        setHttpConfiguration( wagon, headers, new Properties() );
 
         Server server = new Server(  );
         TestHeaderHandler handler = new TestHeaderHandler();
@@ -251,7 +240,7 @@ public void testUserAgentHeaderIsPresentOnlyOnceIfSetMultipleTimes()
         // 1. set User-Agent header via HttpConfiguration
         Properties headers1 = new Properties();
         headers1.setProperty( "User-Agent", "test-user-agent" );
-        setHttpHeaders( wagon, headers1 );
+        setHttpConfiguration( wagon, headers1, new Properties() );
 
         // 2. redundantly set User-Agent header via setHttpHeaders()
         Properties headers2 = new Properties();
@@ -273,7 +262,7 @@ public void testUserAgentHeaderIsPresentOnlyOnceIfSetMultipleTimes()
 
     }
 
-    protected abstract void setHttpHeaders( StreamingWagon wagon, Properties properties );
+    protected abstract void setHttpConfiguration( StreamingWagon wagon, Properties headers, Properties params );
 
     protected ServerConnector addConnector( Server server )
     {
@@ -317,73 +306,6 @@ public void testGet404()
         }
     }
 
-    public void testList429()
-        throws Exception
-    {
-        StreamingWagon wagon = (StreamingWagon) getWagon();
-        try
-        {
-
-            Server server = new Server(  );
-            final AtomicBoolean called = new AtomicBoolean();
-
-            AbstractHandler handler = new AbstractHandler()
-            {
-                public void handle( String target, Request baseRequest, HttpServletRequest request,
-                    HttpServletResponse response ) throws IOException, ServletException
-                {
-                    if ( called.get() )
-                    {
-                        response.setStatus( HttpServletResponse.SC_OK );
-                        baseRequest.setHandled( true );
-                    }
-                    else
-                    {
-                        called.set( true );
-                        response.setStatus( SC_TOO_MANY_REQUESTS );
-                        baseRequest.setHandled( true );
-
-                    }
-                }
-            };
-
-            server.setHandler( handler );
-            ServerConnector serverConnector = addConnector( server );
-            server.start();
-
-            wagon.connect( new Repository( "id", getRepositoryUrl( server ) ) );
-
-            try
-            {
-                wagon.getFileList( "resource" );
-            }
-            finally
-            {
-                wagon.disconnect();
-
-                server.stop();
-            }
-
-        }
-        catch ( ResourceDoesNotExistException e )
-        {
-            assertTrue( true );
-        }
-        catch ( TransferFailedException e )
-        {
-            if ( wagon.getClass().getName().contains( "Lightweight" ) )
-            {
-                //we don't care about lightweight
-                assertTrue( true );
-            }
-            else
-            {
-                fail();
-            }
-
-        }
-    }
-
     public void testGet500()
         throws Exception
     {
@@ -1167,6 +1089,73 @@ public void testRedirectPutFileRelativeUrl()
         }
     }
 
+    public void testRedirectPutFailureNonRepeatableStream()
+            throws Exception
+        {
+            File repositoryDirectory = getRepositoryDirectory();
+            FileUtils.deleteDirectory( repositoryDirectory );
+            repositoryDirectory.mkdirs();
+
+            Server redirectServer = new Server( );
+
+            addConnector( redirectServer );
+
+            RedirectHandler redirectHandler =
+                new RedirectHandler( "See Other", HttpServletResponse.SC_SEE_OTHER, "/redirectRequest/foo",
+                                     null );
+
+            redirectServer.setHandler( redirectHandler );
+
+            redirectServer.start();
+
+            try
+            {
+                StreamingWagon wagon = (StreamingWagon) getWagon();
+
+                Properties params = new Properties();
+                params.put( "http.protocol.expect-continue", "%b,false" );
+                setHttpConfiguration( wagon, new Properties(), params );
+                Repository repository = new Repository( "foo", getRepositoryUrl( redirectServer ) );
+                wagon.connect( repository );
+
+                File sourceFile = new File( repositoryDirectory, "/redirectRequest/foo/test-secured-put-resource" );
+                sourceFile.delete();
+                assertFalse( sourceFile.exists() );
+
+                File tempFile = File.createTempFile( "wagon", "tmp" );
+                tempFile.deleteOnExit();
+                String content = "put top secret";
+                FileUtils.fileWrite( tempFile.getAbsolutePath(), content );
+
+                try ( FileInputStream fileInputStream = new FileInputStream( tempFile ) )
+                {
+                    wagon.putFromStream( fileInputStream, "test-secured-put-resource", content.length(), -1 );
+                    // This does not behave as expected because LightweightWagon does buffering by default
+                    if ( wagon.getClass().getName().contains( "Lightweight" ) )
+                    {
+                        assertTrue( true );
+                    }
+                    else
+                    {
+                        fail();
+                    }
+                }
+                catch ( TransferFailedException e )
+                {
+                    assertTrue( true );
+                }
+                finally
+                {
+                    wagon.disconnect();
+                    tempFile.delete();
+                }
+
+            }
+            finally
+            {
+                redirectServer.stop();
+            }
+        }
 
     /**
      *
@@ -1810,7 +1799,7 @@ public void testSecuredPutUnauthorized()
             runTestSecuredPut( null );
             fail();
         }
-        catch ( TransferFailedException e )
+        catch ( AuthorizationException e )
         {
             assertTrue( true );
         }
@@ -1827,7 +1816,7 @@ public void testSecuredPutWrongPassword()
             runTestSecuredPut( authInfo );
             fail();
         }
-        catch ( TransferFailedException e )
+        catch ( AuthorizationException e )
         {
             assertTrue( true );
         }
@@ -2329,7 +2318,7 @@ protected void verifyWagonExceptionMessage( Exception e, int forStatusCode, Stri
                     assertTrue( "404 not found response should throw ResourceDoesNotExistException",
                             e instanceof ResourceDoesNotExistException );
                     reasonPhrase = StringUtils.isEmpty( forReasonPhrase ) ? " Not Found" : ( " " + forReasonPhrase );
-                    assertEquals( assertMessageForBadMessage, "Resource missing at " + forUrl + " 404"
+                    assertEquals( assertMessageForBadMessage, "resource missing at " + forUrl + ", status: 404"
                             + reasonPhrase, e.getMessage() );
                     break;
 
@@ -2340,7 +2329,7 @@ protected void verifyWagonExceptionMessage( Exception e, int forStatusCode, Stri
                                     + "methods",
                             e instanceof AuthorizationException );
                     reasonPhrase = StringUtils.isEmpty( forReasonPhrase ) ? " Unauthorized" : ( " " + forReasonPhrase );
-                    assertEquals( assertMessageForBadMessage, "Authentication failed for " + forUrl + " 401"
+                    assertEquals( assertMessageForBadMessage, "authentication failed for " + forUrl + ", status: 401"
                             + reasonPhrase, e.getMessage() );
                     break;
 
@@ -2349,15 +2338,15 @@ protected void verifyWagonExceptionMessage( Exception e, int forStatusCode, Stri
                             e instanceof AuthorizationException );
                     reasonPhrase = StringUtils.isEmpty( forReasonPhrase ) ? " Proxy Authentication Required"
                             : ( " " + forReasonPhrase );
-                    assertEquals( assertMessageForBadMessage, "HTTP proxy server authentication failed for "
-                            + forUrl + " 407" + reasonPhrase, e.getMessage() );
+                    assertEquals( assertMessageForBadMessage, "proxy authentication failed for "
+                            + forUrl + ", status: 407" + reasonPhrase, e.getMessage() );
                     break;
 
                 case HttpServletResponse.SC_FORBIDDEN:
                     assertTrue( "403 Forbidden should throw AuthorizationException",
                             e instanceof AuthorizationException );
                     reasonPhrase = StringUtils.isEmpty( forReasonPhrase ) ? " Forbidden" : ( " " + forReasonPhrase );
-                    assertEquals( assertMessageForBadMessage, "Authorization failed for " + forUrl + " 403"
+                    assertEquals( assertMessageForBadMessage, "authorization failed for " + forUrl + ", status: 403"
                             + reasonPhrase, e.getMessage() );
                     break;
 
@@ -2367,7 +2356,7 @@ protected void verifyWagonExceptionMessage( Exception e, int forStatusCode, Stri
                     assertTrue( "expected status code for transfer failures should be >= 400",
                             forStatusCode >= HttpServletResponse.SC_BAD_REQUEST );
                     reasonPhrase = forReasonPhrase == null ? "" : " " + forReasonPhrase;
-                    assertEquals( assertMessageForBadMessage, "Transfer failed for " + forUrl + " "
+                    assertEquals( assertMessageForBadMessage, "transfer failed for " + forUrl + ", status: "
                             + forStatusCode + reasonPhrase, e.getMessage() );
                     break;
             }
diff --git a/wagon-providers/pom.xml b/wagon-providers/pom.xml
index 3ce50c2..ae78f7b 100644
--- a/wagon-providers/pom.xml
+++ b/wagon-providers/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
@@ -50,12 +50,18 @@ under the License.
       <dependency>
         <groupId>org.apache.httpcomponents</groupId>
         <artifactId>httpclient</artifactId>
-        <version>4.5.9</version>
+        <version>4.5.13</version>
+      </dependency>
+      <!-- Overwrite transitive dependency version of HttpClient -->
+      <dependency>
+        <groupId>commons-codec</groupId>
+        <artifactId>commons-codec</artifactId>
+        <version>1.15</version>
       </dependency>
       <dependency>
         <groupId>org.apache.httpcomponents</groupId>
         <artifactId>httpcore</artifactId>
-        <version>4.4.11</version>
+        <version>4.4.15</version>
       </dependency>
       <dependency>
         <groupId>org.apache.sshd</groupId>
diff --git a/wagon-providers/wagon-file/pom.xml b/wagon-providers/wagon-file/pom.xml
index 1111e7e..0f56aab 100644
--- a/wagon-providers/wagon-file/pom.xml
+++ b/wagon-providers/wagon-file/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon-providers</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
diff --git a/wagon-providers/wagon-ftp/pom.xml b/wagon-providers/wagon-ftp/pom.xml
index e53d5a9..f2b145d 100644
--- a/wagon-providers/wagon-ftp/pom.xml
+++ b/wagon-providers/wagon-ftp/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon-providers</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
diff --git a/wagon-providers/wagon-ftp/src/site/apt/index.apt b/wagon-providers/wagon-ftp/src/site/apt/index.apt
index a44f821..fe31c1c 100644
--- a/wagon-providers/wagon-ftp/src/site/apt/index.apt
+++ b/wagon-providers/wagon-ftp/src/site/apt/index.apt
@@ -26,6 +26,10 @@
  ~~ NOTE: For help with the syntax of this file, see:
  ~~ http://maven.apache.org/doxia/references/apt-format.html
 
+Deprecation Notice
+
+  This Wagon provider is deprecated and will be removed in version 4.0.0.
+
 Maven Wagon FTP
 
  This component is an implementation of Wagon provider for FTP access.
diff --git a/wagon-providers/wagon-http-lightweight/pom.xml b/wagon-providers/wagon-http-lightweight/pom.xml
index f1ea7be..d918250 100644
--- a/wagon-providers/wagon-http-lightweight/pom.xml
+++ b/wagon-providers/wagon-http-lightweight/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon-providers</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
diff --git a/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java b/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java
index d0f32eb..4cd937b 100644
--- a/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java
+++ b/wagon-providers/wagon-http-lightweight/src/main/java/org/apache/maven/wagon/providers/http/LightweightHttpWagon.java
@@ -19,7 +19,6 @@
  * under the License.
  */
 
-import org.apache.commons.io.IOUtils;
 import org.apache.maven.wagon.ConnectionException;
 import org.apache.maven.wagon.InputData;
 import org.apache.maven.wagon.OutputData;
@@ -32,7 +31,6 @@
 import org.apache.maven.wagon.proxy.ProxyInfo;
 import org.apache.maven.wagon.resource.Resource;
 import org.apache.maven.wagon.shared.http.EncodingUtil;
-import org.apache.maven.wagon.shared.http.HtmlFileListParser;
 import org.codehaus.plexus.util.Base64;
 
 import java.io.FileNotFoundException;
@@ -169,8 +167,10 @@ public void fillInputData( InputData inputData )
                 int responseCode = urlConnection.getResponseCode();
                 String reasonPhrase = urlConnection.getResponseMessage();
 
+                // TODO Move 401/407 to AuthenticationException after WAGON-587
                 if ( responseCode == HttpURLConnection.HTTP_FORBIDDEN
-                        || responseCode == HttpURLConnection.HTTP_UNAUTHORIZED )
+                        || responseCode == HttpURLConnection.HTTP_UNAUTHORIZED
+                        || responseCode == HttpURLConnection.HTTP_PROXY_AUTH )
                 {
                     throw new AuthorizationException( formatAuthorizationMessage( buildUrl( resource ),
                             responseCode, reasonPhrase, getProxyInfo() ) );
@@ -276,12 +276,15 @@ protected void finishPutTransfer( Resource resource, InputStream input, OutputSt
                 case HttpURLConnection.HTTP_NO_CONTENT: // 204
                     break;
 
-                // TODO: handle 401 explicitly?
+                // TODO Move 401/407 to AuthenticationException after WAGON-587
                 case HttpURLConnection.HTTP_FORBIDDEN:
+                case HttpURLConnection.HTTP_UNAUTHORIZED:
+                case HttpURLConnection.HTTP_PROXY_AUTH:
                     throw new AuthorizationException( formatAuthorizationMessage( buildUrl( resource ), statusCode,
                             reasonPhrase, getProxyInfo() ) );
 
                 case HttpURLConnection.HTTP_NOT_FOUND:
+                case HttpURLConnection.HTTP_GONE:
                     throw new ResourceDoesNotExistException( formatResourceDoesNotExistMessage( buildUrl( resource ),
                             statusCode, reasonPhrase, getProxyInfo() ) );
 
@@ -379,50 +382,6 @@ public void closeConnection()
         authenticator.resetWagon();
     }
 
-    public List<String> getFileList( String destinationDirectory )
-        throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
-    {
-        InputData inputData = new InputData();
-
-        if ( destinationDirectory.length() > 0 && !destinationDirectory.endsWith( "/" ) )
-        {
-            destinationDirectory += "/";
-        }
-
-        String url = buildUrl( new Resource( destinationDirectory ) );
-
-        Resource resource = new Resource( destinationDirectory );
-
-        inputData.setResource( resource );
-
-        fillInputData( inputData );
-
-        InputStream is = inputData.getInputStream();
-
-        try
-        {
-
-            if ( is == null )
-            {
-                throw new TransferFailedException(
-                    url + " - Could not open input stream for resource: '" + resource + "'" );
-            }
-
-            final List<String> htmlFileList = HtmlFileListParser.parseFileList( url, is );
-            is.close();
-            is = null;
-            return htmlFileList;
-        }
-        catch ( final IOException e )
-        {
-            throw new TransferFailedException( "Failure transferring " + resource.getName(), e );
-        }
-        finally
-        {
-            IOUtils.closeQuietly( is );
-        }
-    }
-
     public boolean resourceExists( String resourceName )
         throws TransferFailedException, AuthorizationException
     {
@@ -437,27 +396,29 @@ public boolean resourceExists( String resourceName )
             addHeaders( headConnection );
 
             headConnection.setRequestMethod( "HEAD" );
-            headConnection.setDoOutput( true );
 
             int statusCode = headConnection.getResponseCode();
+            String reasonPhrase = headConnection.getResponseMessage();
 
             switch ( statusCode )
             {
                 case HttpURLConnection.HTTP_OK:
                     return true;
 
-                case HttpURLConnection.HTTP_FORBIDDEN:
-                    throw new AuthorizationException( "Access denied to: " + url );
-
                 case HttpURLConnection.HTTP_NOT_FOUND:
+                case HttpURLConnection.HTTP_GONE:
                     return false;
 
+                // TODO Move 401/407 to AuthenticationException after WAGON-587
+                case HttpURLConnection.HTTP_FORBIDDEN:
                 case HttpURLConnection.HTTP_UNAUTHORIZED:
-                    throw new AuthorizationException( "Access denied to: " + url );
+                case HttpURLConnection.HTTP_PROXY_AUTH:
+                    throw new AuthorizationException( formatAuthorizationMessage( buildUrl( resource ),
+                            statusCode, reasonPhrase, getProxyInfo() ) );
 
                 default:
-                    throw new TransferFailedException(
-                        "Failed to look for file: " + buildUrl( resource ) + ". Return code is: " + statusCode );
+                    throw new TransferFailedException( formatTransferFailedMessage( buildUrl( resource ),
+                            statusCode, reasonPhrase, getProxyInfo() ) );
             }
         }
         catch ( IOException e )
diff --git a/wagon-providers/wagon-http-lightweight/src/site/apt/index.apt b/wagon-providers/wagon-http-lightweight/src/site/apt/index.apt
index 3a123b3..975f2dc 100644
--- a/wagon-providers/wagon-http-lightweight/src/site/apt/index.apt
+++ b/wagon-providers/wagon-http-lightweight/src/site/apt/index.apt
@@ -26,11 +26,15 @@
  ~~ NOTE: For help with the syntax of this file, see:
  ~~ http://maven.apache.org/doxia/references/apt-format.html
 
+Deprecation Notice
+
+  This Wagon provider is deprecated and will be removed in version 4.0.0.
+
 Maven Wagon HTTP lightweight
 
  This component is an implementation of Wagon provider for HTTP access.
  It uses standard JDK classes as lower lever layer.
- 
+
  It enables Maven to use remote repositories stored in HTTP servers.
 
 
@@ -39,7 +43,7 @@ Features
  * Get files from HTTP/HTTPS Server
 
  * Put files to HTTP/HTTPS Server
- 
+
 Known Limitation
 
  The main limitation is that you can't download data that doesn't fit entirely into memory.
diff --git a/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java b/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java
index 5d2eb57..2c07ed6 100644
--- a/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java
+++ b/wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpWagonTest.java
@@ -49,9 +49,9 @@ protected String getTestRepositoryUrl()
         return getProtocol() + "://localhost:" + getTestRepositoryPort() + "/";
     }
 
-    protected void setHttpHeaders( StreamingWagon wagon, Properties properties )
+    protected void setHttpConfiguration( StreamingWagon wagon, Properties headers, Properties params )
     {
-        ( (LightweightHttpWagon) wagon ).setHttpHeaders( properties );
+        ( (LightweightHttpWagon) wagon ).setHttpHeaders( headers );
     }
 
     @Override
@@ -99,12 +99,12 @@ protected void verifyWagonExceptionMessage( Exception e, int forStatusCode, Stri
                                 e.getCause() instanceof FileNotFoundException );
                         // the status code and reason phrase cannot always be learned due to implementation limitations
                         // which means the message may not include them
-                        assertEquals( assertMessageForBadMessage, "Resource missing at " + forUrl, e.getMessage() );
+                        assertEquals( assertMessageForBadMessage, "resource missing at " + forUrl, e.getMessage() );
                     }
                     else
                     {
-                        assertEquals( assertMessageForBadMessage, "Resource missing at " + forUrl
-                                + " " + forStatusCode + " " + forReasonPhrase, e.getMessage() );
+                        assertEquals( assertMessageForBadMessage, "resource missing at " + forUrl
+                                + ", status: " + forStatusCode + " " + forReasonPhrase, e.getMessage() );
                     }
 
                     break;
@@ -113,7 +113,7 @@ protected void verifyWagonExceptionMessage( Exception e, int forStatusCode, Stri
                     assertTrue( "403 Forbidden throws AuthorizationException",
                             e instanceof AuthorizationException );
 
-                    assertEquals( assertMessageForBadMessage, "Authorization failed for " + forUrl + " 403"
+                    assertEquals( assertMessageForBadMessage, "authorization failed for " + forUrl + ", status: 403"
                             + ( StringUtils.isEmpty( forReasonPhrase ) ? " Forbidden" : ( " " + forReasonPhrase ) ),
                             e.getMessage() );
                     break;
@@ -122,7 +122,7 @@ protected void verifyWagonExceptionMessage( Exception e, int forStatusCode, Stri
                     assertTrue( "401 Unauthorized throws AuthorizationException",
                             e instanceof AuthorizationException );
 
-                    assertEquals( assertMessageForBadMessage, "Authentication failed for " + forUrl + " 401"
+                    assertEquals( assertMessageForBadMessage, "authentication failed for " + forUrl + ", status: 401"
                                     + ( StringUtils.isEmpty( forReasonPhrase ) ? " Unauthorized" :
                                     ( " " + forReasonPhrase ) ),
                             e.getMessage() );
@@ -144,18 +144,18 @@ protected void verifyWagonExceptionMessage( Exception e, int forStatusCode, Stri
                     // the status code and reason phrase cannot always be learned due to implementation limitations
                     // so the message may not include them, but the implementation should use a consistent format
                     assertTrue( "message should always include url",
-                            e.getMessage().startsWith( "Transfer failed for " + forUrl ) );
+                            e.getMessage().startsWith( "transfer failed for " + forUrl ) );
 
-                    if ( e.getMessage().length() > ( "Transfer failed for " + forUrl ).length() )
+                    if ( e.getMessage().length() > ( "transfer failed for " + forUrl ).length() )
                     {
                         assertTrue( "message should include url and status code",
-                                e.getMessage().startsWith( "Transfer failed for " + forUrl + " " + forStatusCode ) );
+                                e.getMessage().startsWith( "transfer failed for " + forUrl + ", status: " + forStatusCode ) );
                     }
 
-                    if ( e.getMessage().length() > ( "Transfer failed for " + forUrl + " " + forStatusCode ).length() )
+                    if ( e.getMessage().length() > ( "transfer failed for " + forUrl + ", status: " + forStatusCode ).length() )
                     {
                         assertEquals( "message should include url and status code and reason phrase",
-                                "Transfer failed for " + forUrl + " " + forStatusCode + " " + forReasonPhrase,
+                                "transfer failed for " + forUrl + ", status: " + forStatusCode + " " + forReasonPhrase,
                                 e.getMessage() );
                     }
 
diff --git a/wagon-providers/wagon-http-shared/pom.xml b/wagon-providers/wagon-http-shared/pom.xml
index 400cdae..ec60a09 100644
--- a/wagon-providers/wagon-http-shared/pom.xml
+++ b/wagon-providers/wagon-http-shared/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon-providers</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
@@ -34,11 +34,6 @@ under the License.
   </description>
 
   <dependencies>
-    <dependency>
-      <groupId>org.jsoup</groupId>
-      <artifactId>jsoup</artifactId>
-      <version>1.12.1</version>
-    </dependency>
     <dependency>
       <groupId>org.apache.httpcomponents</groupId>
       <artifactId>httpclient</artifactId>
diff --git a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
old mode 100755
new mode 100644
index 3bf4291..01f09bc
--- a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
+++ b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/AbstractHttpClientWagon.java
@@ -23,7 +23,6 @@
 import org.apache.http.HttpEntity;
 import org.apache.http.HttpException;
 import org.apache.http.HttpHost;
-import org.apache.http.HttpResponse;
 import org.apache.http.HttpStatus;
 import org.apache.http.auth.AuthSchemeProvider;
 import org.apache.http.auth.AuthScope;
@@ -92,6 +91,7 @@
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.RandomAccessFile;
+import java.nio.Buffer;
 import java.nio.ByteBuffer;
 import java.nio.channels.Channels;
 import java.nio.channels.ReadableByteChannel;
@@ -119,7 +119,7 @@
 public abstract class AbstractHttpClientWagon
     extends StreamWagon
 {
-    private final class WagonHttpEntity
+    final class WagonHttpEntity
         extends AbstractHttpEntity
     {
         private final Resource resource;
@@ -154,9 +154,14 @@ private WagonHttpEntity( final InputStream stream, final Resource resource, fina
             this.wagon = wagon;
         }
 
-        public long getContentLength()
+        public Resource getResource()
         {
-            return length;
+            return resource;
+        }
+
+        public Wagon getWagon()
+        {
+            return wagon;
         }
 
         public InputStream getContent()
@@ -169,6 +174,16 @@ public InputStream getContent()
             return stream;
         }
 
+        public File getSource()
+        {
+            return source;
+        }
+
+        public long getContentLength()
+        {
+            return length;
+        }
+
         public boolean isRepeatable()
         {
             return repeatable;
@@ -199,29 +214,29 @@ public void writeTo( final OutputStream output )
                     if ( read == -1 )
                     {
                         // EOF, but some data has not been written yet.
-                        if ( buffer.position() != 0 )
+                        if ( ( (Buffer) buffer ).position() != 0 )
                         {
-                            buffer.flip();
-                            fireTransferProgress( transferEvent, buffer.array(), buffer.limit() );
-                            output.write( buffer.array(), 0, buffer.limit() );
-                            buffer.clear();
+                            ( (Buffer) buffer ).flip();
+                            fireTransferProgress( transferEvent, buffer.array(), ( (Buffer) buffer ).limit() );
+                            output.write( buffer.array(), 0, ( (Buffer) buffer ).limit() );
+                            ( (Buffer) buffer ).clear();
                         }
 
                         break;
                     }
 
-                    // Prevent minichunking / fragmentation: when less than half the buffer is utilized,
+                    // Prevent minichunking/fragmentation: when less than half the buffer is utilized,
                     // read some more bytes before writing and firing progress.
-                    if ( buffer.position() < halfBufferCapacity )
+                    if ( ( (Buffer) buffer ).position() < halfBufferCapacity )
                     {
                         continue;
                     }
 
-                    buffer.flip();
-                    fireTransferProgress( transferEvent, buffer.array(), buffer.limit() );
-                    output.write( buffer.array(), 0, buffer.limit() );
-                    remaining -= buffer.limit();
-                    buffer.clear();
+                    ( (Buffer) buffer ).flip();
+                    fireTransferProgress( transferEvent, buffer.array(), ( (Buffer) buffer ).limit() );
+                    output.write( buffer.array(), 0, ( (Buffer) buffer ).limit() );
+                    remaining -= ( (Buffer) buffer ).limit();
+                    ( (Buffer) buffer ).clear();
 
                 }
                 output.flush();
@@ -330,8 +345,8 @@ protected int backoff( int wait, String url )
         int nextWait = wait * 2;
         if ( nextWait >= getMaxBackoffWaitSeconds() )
         {
-            throw new TransferFailedException(
-                "Waited too long to access: " + url + ". Return code is: " + SC_TOO_MANY_REQUESTS );
+            throw new TransferFailedException( formatTransferFailedMessage( url, SC_TOO_MANY_REQUESTS,
+                    null, getProxyInfo() ) );
         }
         return nextWait;
     }
@@ -545,6 +560,7 @@ private static CloseableHttpClient createClient()
             .setRetryHandler( createRetryHandler() )
             .setServiceUnavailableRetryStrategy( createServiceUnavailableRetryStrategy() )
             .setDefaultAuthSchemeRegistry( createAuthSchemeRegistry() )
+            .setRedirectStrategy( new WagonRedirectStrategy() )
             .build();
     }
 
@@ -594,10 +610,9 @@ public void openConnectionInternal()
             {
                 Credentials creds = new UsernamePasswordCredentials( username, password );
 
-                String host = getRepository().getHost();
-                int port = getRepository().getPort();
-
-                credentialsProvider.setCredentials( getBasicAuthScope().getScope( host, port ), creds );
+                AuthScope targetScope = getBasicAuthScope().getScope( getRepository().getHost(),
+                                                                    getRepository().getPort() );
+                credentialsProvider.setCredentials( targetScope, creds );
             }
         }
 
@@ -623,10 +638,8 @@ public void openConnectionInternal()
                         creds = new UsernamePasswordCredentials( proxyUsername, proxyPassword );
                     }
 
-                    int proxyPort = proxyInfo.getPort();
-
-                    AuthScope authScope = getProxyBasicAuthScope().getScope( proxyHost, proxyPort );
-                    credentialsProvider.setCredentials( authScope, creds );
+                    AuthScope proxyScope = getProxyBasicAuthScope().getScope( proxyHost, proxyInfo.getPort() );
+                    credentialsProvider.setCredentials( proxyScope, creds );
                 }
             }
         }
@@ -657,9 +670,9 @@ public static CloseableHttpClient getHttpClient()
         return httpClient;
     }
 
-    public static void setPersistentPool( boolean persistentPool )
+    public static void setPersistentPool( boolean persistent )
     {
-        persistentPool = persistentPool;
+        persistentPool = persistent;
     }
 
     public static void setPoolingHttpClientConnectionManager(
@@ -759,6 +772,7 @@ private void put( int wait, Resource resource, File source, HttpEntity httpEntit
         // preemptive for put
         // TODO: is it a good idea, though? 'Expect-continue' handshake would serve much better
 
+        // FIXME Perform only when preemptive has been configured
         Repository repo = getRepository();
         HttpHost targetHost = new HttpHost( repo.getHost(), repo.getPort(), repo.getProtocol() );
         AuthScope targetScope = getBasicAuthScope().getScope( targetHost );
@@ -793,30 +807,31 @@ private void put( int wait, Resource resource, File source, HttpEntity httpEntit
                     case HttpStatus.SC_ACCEPTED: // 202
                     case HttpStatus.SC_NO_CONTENT:  // 204
                         break;
-                    // handle all redirect even if http specs says " the user agent MUST NOT automatically redirect
-                    // the request unless it can be confirmed by the user"
-                    case HttpStatus.SC_MOVED_PERMANENTLY: // 301
-                    case HttpStatus.SC_MOVED_TEMPORARILY: // 302
-                    case HttpStatus.SC_SEE_OTHER: // 303
-                        put( resource, source, httpEntity, calculateRelocatedUrl( response ) );
-                        return;
-                    //case HttpStatus.SC_UNAUTHORIZED:
+
+                    // TODO Move 401/407 to AuthenticationException after WAGON-587
                     case HttpStatus.SC_FORBIDDEN:
+                    case HttpStatus.SC_UNAUTHORIZED:
+                    case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
+                        EntityUtils.consumeQuietly( response.getEntity() );
                         fireSessionConnectionRefused();
                         throw new AuthorizationException( formatAuthorizationMessage( url,
                                 response.getStatusLine().getStatusCode(),
                                 response.getStatusLine().getReasonPhrase(), getProxyInfo() ) );
 
                     case HttpStatus.SC_NOT_FOUND:
+                    case HttpStatus.SC_GONE:
+                        EntityUtils.consumeQuietly( response.getEntity() );
                         throw new ResourceDoesNotExistException( formatResourceDoesNotExistMessage( url,
                                 response.getStatusLine().getStatusCode(),
                                 response.getStatusLine().getReasonPhrase(), getProxyInfo() ) );
 
                     case SC_TOO_MANY_REQUESTS:
+                        EntityUtils.consumeQuietly( response.getEntity() );
                         put( backoff( wait, url ), resource, source, httpEntity, url );
                         break;
                     //add more entries here
                     default:
+                        EntityUtils.consumeQuietly( response.getEntity() );
                         TransferFailedException e = new TransferFailedException( formatTransferFailedMessage( url,
                                 response.getStatusLine().getStatusCode(),
                                 response.getStatusLine().getReasonPhrase(), getProxyInfo() ) );
@@ -842,14 +857,6 @@ private void put( int wait, Resource resource, File source, HttpEntity httpEntit
 
     }
 
-    protected String calculateRelocatedUrl( HttpResponse response )
-    {
-        Header locationHeader = response.getFirstHeader( "Location" );
-        String locationField = locationHeader.getValue();
-        // is it a relative Location or a full ?
-        return locationField.startsWith( "http" ) ? locationField : getURL( getRepository() ) + '/' + locationField;
-    }
-
     protected void mkdirs( String dirname )
         throws HttpException, IOException
     {
@@ -884,6 +891,7 @@ private boolean resourceExists( int wait, String resourceName )
                         result = true;
                         break;
 
+                    // TODO Move 401/407 to AuthenticationException after WAGON-587
                     case HttpStatus.SC_FORBIDDEN:
                     case HttpStatus.SC_UNAUTHORIZED:
                     case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
@@ -892,6 +900,7 @@ private boolean resourceExists( int wait, String resourceName )
                                 response.getStatusLine().getReasonPhrase(), getProxyInfo() ) );
 
                     case HttpStatus.SC_NOT_FOUND:
+                    case HttpStatus.SC_GONE:
                         result = false;
                         break;
 
@@ -905,7 +914,6 @@ private boolean resourceExists( int wait, String resourceName )
                                 response.getStatusLine().getReasonPhrase(), getProxyInfo() ) );
                 }
 
-                EntityUtils.consume( response.getEntity() );
                 return result;
             }
             finally
@@ -958,11 +966,6 @@ protected CloseableHttpResponse execute( HttpUriRequest httpMethod )
             }
         }
 
-        if ( httpMethod instanceof HttpPut )
-        {
-            requestConfigBuilder.setRedirectsEnabled( false );
-        }
-
         HttpClientContext localContext = HttpClientContext.create();
         localContext.setCredentialsProvider( credentialsProvider );
         localContext.setAuthCache( authCache );
@@ -1010,7 +1013,6 @@ public void setHeaders( HttpUriRequest method )
         {
             // TODO: merge with the other headers and have some better defaults, unify with lightweight headers
             method.addHeader(  "Cache-control", "no-cache" );
-            method.addHeader( "Cache-store", "no-store" );
             method.addHeader( "Pragma", "no-cache" );
         }
 
@@ -1173,25 +1175,31 @@ private void fillInputData( int wait, InputData inputData )
                     // return, leaving last modified set to original value so getIfNewer should return unmodified
                     return;
 
+                // TODO Move 401/407 to AuthenticationException after WAGON-587
                 case HttpStatus.SC_FORBIDDEN:
                 case HttpStatus.SC_UNAUTHORIZED:
                 case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
+                    EntityUtils.consumeQuietly( response.getEntity() );
                     fireSessionConnectionRefused();
                     throw new AuthorizationException( formatAuthorizationMessage( url,
                             response.getStatusLine().getStatusCode(), response.getStatusLine().getReasonPhrase(),
                             getProxyInfo() ) );
 
                 case HttpStatus.SC_NOT_FOUND:
+                case HttpStatus.SC_GONE:
+                    EntityUtils.consumeQuietly( response.getEntity() );
                     throw new ResourceDoesNotExistException( formatResourceDoesNotExistMessage( url,
                             response.getStatusLine().getStatusCode(),
                             response.getStatusLine().getReasonPhrase(), getProxyInfo() ) );
 
                 case SC_TOO_MANY_REQUESTS:
+                    EntityUtils.consumeQuietly( response.getEntity() );
                     fillInputData( backoff( wait, url ), inputData );
                     break;
 
                 // add more entries here
                 default:
+                    EntityUtils.consumeQuietly( response.getEntity() );
                     cleanupGetTransfer( resource );
                     TransferFailedException e = new TransferFailedException( formatTransferFailedMessage( url,
                             response.getStatusLine().getStatusCode(), response.getStatusLine().getReasonPhrase(),
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 3c82851..0a1320a 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,8 @@ 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";
+    private static final String HANDLE_URI_NORMALIZATION    = "http.protocol.handle-uri-normalization";
 
     private static final String COERCE_PATTERN = "%(\\w+),(.+)";
 
@@ -100,7 +102,7 @@ else if ( key.equals( USE_EXPECT_CONTINUE ) )
                 }
                 else if ( key.equals( DEFAULT_PROXY ) )
                 {
-                    builder.setProxy( new HttpHost( value ) );
+                    builder.setProxy( HttpHost.create( value ) );
                 }
                 else if ( key.equals( LOCAL_ADDRESS ) )
                 {
@@ -149,6 +151,14 @@ else if ( key.equals( REJECT_RELATIVE_REDIRECT ) )
                 {
                     builder.setRelativeRedirectsAllowed( !Boolean.valueOf( value ) );
                 }
+                else if ( key.equals ( HANDLE_CONTENT_COMPRESSION ) )
+                {
+                    builder.setContentCompressionEnabled( Boolean.valueOf( value ) );
+                }
+                else if ( key.equals ( HANDLE_URI_NORMALIZATION ) )
+                {
+                    builder.setNormalizeUri( Boolean.valueOf( value ) );
+                }
             }
         }
     }
diff --git a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/EncodingUtil.java b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/EncodingUtil.java
index 67f5e5f..c0a992c 100644
--- a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/EncodingUtil.java
+++ b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/EncodingUtil.java
@@ -92,7 +92,13 @@ public static String encodeURLToString( String baseUrl, String path )
     {
         String[] pathSegments = path == null ? new String[0] : path.split( "/" );
 
-        return encodeURLToString( baseUrl, pathSegments );
+        String encodedUrl = encodeURLToString( baseUrl, pathSegments );
+        if ( path != null && path.endsWith( "/" ) )
+        {
+            return encodedUrl + "/";
+        }
+
+        return encodedUrl;
     }
 
     /**
diff --git a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
deleted file mode 100644
index e27696a..0000000
--- a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HtmlFileListParser.java
+++ /dev/null
@@ -1,164 +0,0 @@
-package org.apache.maven.wagon.shared.http;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.commons.io.IOUtils;
-import org.apache.maven.wagon.TransferFailedException;
-import org.jsoup.Jsoup;
-import org.jsoup.nodes.Document;
-import org.jsoup.nodes.Element;
-import org.jsoup.select.Elements;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UnsupportedEncodingException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.net.URLDecoder;
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.regex.Pattern;
-
-/**
- * Html File List Parser.
- */
-public class HtmlFileListParser
-{
-    // Apache Fancy Index Sort Headers
-    private static final Pattern APACHE_INDEX_SKIP = Pattern.compile( "\\?[CDMNS]=.*" );
-
-    // URLs with excessive paths.
-    private static final Pattern URLS_WITH_PATHS = Pattern.compile( "/[^/]*/" );
-
-    // URLs that to a parent directory.
-    private static final Pattern URLS_TO_PARENT = Pattern.compile( "\\.\\./" );
-
-    // mailto urls
-    private static final Pattern MAILTO_URLS = Pattern.compile( "mailto:.*" );
-
-    private static final Pattern[] SKIPS =
-        new Pattern[]{ APACHE_INDEX_SKIP, URLS_WITH_PATHS, URLS_TO_PARENT, MAILTO_URLS };
-
-    /**
-     * Fetches a raw HTML from a provided InputStream, parses it, and returns the file list.
-     *
-     * @param stream the input stream.
-     * @return the file list.
-     * @throws TransferFailedException if there was a problem fetching the raw html.
-     */
-    public static List<String> parseFileList( String baseurl, InputStream stream )
-        throws TransferFailedException
-    {
-        try
-        {
-            URI baseURI = new URI( baseurl );
-            // to make debugging easier, start with a string. This is assuming UTF-8, which might not be a safe
-            // assumption.
-            String content = IOUtils.toString( stream, "utf-8" );
-            Document doc = Jsoup.parse( content, baseurl );
-            Elements links = doc.select( "a[href]" );
-            Set<String> results = new HashSet<String>();
-            for ( Element link : links )
-            {
-                /*
-                 * The abs:href loses directories, so we deal with absolute paths ourselves below in cleanLink
-                 */
-                String target = link.attr( "href" );
-                if ( target != null )
-                {
-                    String clean = cleanLink( baseURI, target );
-                    if ( isAcceptableLink( clean ) )
-                    {
-                        results.add( clean );
-                    }
-                }
-
-            }
-
-            return new ArrayList<String>( results );
-        }
-        catch ( URISyntaxException e )
-        {
-            throw new TransferFailedException( "Unable to parse as base URI: " + baseurl, e );
-        }
-        catch ( IOException e )
-        {
-            throw new TransferFailedException( "I/O error reading HTML listing of artifacts: " + e.getMessage(), e );
-        }
-    }
-
-    private static String cleanLink( URI baseURI, String link )
-    {
-        if ( link == null || link.length() == 0 )
-        {
-            return "";
-        }
-
-        String ret = link;
-
-        try
-        {
-            URI linkuri = new URI( ret );
-            if ( link.startsWith( "/" ) )
-            {
-                linkuri = baseURI.resolve( linkuri );
-            }
-            URI relativeURI = baseURI.relativize( linkuri ).normalize();
-            ret = relativeURI.toASCIIString();
-            if ( ret.startsWith( baseURI.getPath() ) )
-            {
-                ret = ret.substring( baseURI.getPath().length() );
-            }
-
-            ret = URLDecoder.decode( ret, "UTF-8" );
-        }
-        catch ( URISyntaxException e )
-        {
-            // ignore
-        }
-        catch ( UnsupportedEncodingException e )
-        {
-            // ignore
-        }
-
-        return ret;
-    }
-
-    private static boolean isAcceptableLink( String link )
-    {
-        if ( link == null || link.length() == 0 )
-        {
-            return false;
-        }
-
-        for ( Pattern pattern : SKIPS )
-        {
-            if ( pattern.matcher( link ).find() )
-            {
-                return false;
-            }
-        }
-
-        return true;
-    }
-
-}
\ No newline at end of file
diff --git a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HttpConfiguration.java b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HttpConfiguration.java
index 34fc61c..0a8652c 100644
--- a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HttpConfiguration.java
+++ b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HttpConfiguration.java
@@ -25,11 +25,11 @@
 import org.apache.http.client.methods.HttpUriRequest;
 
 /**
- * 
+ *
  */
 public class HttpConfiguration
 {
-    
+
     private static final HttpMethodConfiguration DEFAULT_PUT =
         new HttpMethodConfiguration().addParam( "http.protocol.expect-continue", "%b,true" );
 
diff --git a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HttpMessageUtils.java b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HttpMessageUtils.java
index a58b653..3477863 100644
--- a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HttpMessageUtils.java
+++ b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HttpMessageUtils.java
@@ -19,6 +19,8 @@
  * under the License.
  */
 
+import java.util.Objects;
+
 import org.apache.maven.wagon.ResourceDoesNotExistException;
 import org.apache.maven.wagon.TransferFailedException;
 import org.apache.maven.wagon.authorization.AuthorizationException;
@@ -35,16 +37,17 @@
  * Status-Code is intended for use by automata and the Reason-Phrase is intended for the human user. The client is not
  * required to examine or display the Reason- Phrase.</cite></li>
  * <li>it has been later largely deprecated in <a href="https://tools.ietf.org/html/rfc7230#section-3.1.2">the updated
- * HTTP/1.1 RFC-7230</a>: <cite>The reason-phrase element exists for the sole purpose of providing a textual description
- * associated with the numeric status code, mostly out of deference to earlier Internet application protocols that were
- * more frequently used with interactive text clients. A client SHOULD ignore the reason-phrase content.</cite></li>
- * <li>it has been removed from <a href="https://tools.ietf.org/html/rfc7540#section-8.1.2.4">HTTP/2 RFC 7540</a>:
+ * HTTP/1.1 in RFC 7230</a>: <cite>The reason-phrase element exists for the sole purpose of providing a textual
+ * description associated with the numeric status code, mostly out of deference to earlier Internet application
+ * protocols that were more frequently used with interactive text clients. A client SHOULD ignore the reason-phrase
+ * content.</cite></li>
+ * <li>it has been removed from <a href="https://tools.ietf.org/html/rfc7540#section-8.1.2.4">HTTP/2 in RFC 7540</a>:
  * <cite>HTTP/2 does not define a way to carry the version or reason phrase that is included in an HTTP/1.1 status
  * line.</cite>.</li>
  * </ul>
  * The use of Reason Phrase done here to improve the message to the end-user (particularly in case of failures) will
- * disappear while HTTP/2 is deployed: a new mechanism to provide such a message needs to be defined... 
- * 
+ * disappear while HTTP/2 is deployed: a new mechanism to provide such a message needs to be defined...
+ *
  * @since 3.3.4
  */
 public class HttpMessageUtils
@@ -63,16 +66,16 @@ public class HttpMessageUtils
     public static final int UNKNOWN_STATUS_CODE = -1;
 
     /**
-     * Format a consistent HTTP transfer debug message combining url, status code, status line reason phrase and HTTP
+     * Format a consistent HTTP transfer debug message combining URL, status code, reason phrase and HTTP
      * proxy server info.
      * <p>
-     * Url will always be included in the message. A status code other than {@link #UNKNOWN_STATUS_CODE} will be
+     * URL will always be included in the message. A status code other than {@link #UNKNOWN_STATUS_CODE} will be
      * included. A reason phrase will only be included if non-empty and status code is not {@link #UNKNOWN_STATUS_CODE}.
      * Proxy information will only be included if not null.
      *
      * @param url          the required non-null URL associated with the message
      * @param statusCode   an HTTP response status code
-     * @param reasonPhrase an HTTP status line reason phrase
+     * @param reasonPhrase an HTTP reason phrase
      * @param proxyInfo    proxy server used during the transfer, may be null if none used
      * @return a formatted debug message combining the parameters of this method
      * @throws NullPointerException if url is null
@@ -80,6 +83,7 @@ public class HttpMessageUtils
     public static String formatTransferDebugMessage( String url, int statusCode, String reasonPhrase,
                                                      ProxyInfo proxyInfo )
     {
+        Objects.requireNonNull( url, "url cannot be null" );
         String msg = url;
         if ( statusCode != UNKNOWN_STATUS_CODE )
         {
@@ -91,7 +95,7 @@ public static String formatTransferDebugMessage( String url, int statusCode, Str
         }
         if ( proxyInfo != null )
         {
-            msg += " -- " + proxyInfo.toString();
+            msg += " -- proxy: " + proxyInfo;
         }
         return msg;
     }
@@ -125,7 +129,7 @@ public static String formatTransferFailedMessage( String url, ProxyInfo proxyInf
     public static String formatTransferFailedMessage( String url, int statusCode, String reasonPhrase,
                                                       ProxyInfo proxyInfo )
     {
-        return formatMessage( "Transfer failed for ", url, statusCode, reasonPhrase, proxyInfo );
+        return formatMessage( "transfer failed for ", url, statusCode, reasonPhrase, proxyInfo );
     }
 
     /**
@@ -140,26 +144,27 @@ public static String formatTransferFailedMessage( String url, int statusCode, St
      * @param proxyInfo    proxy server used during the transfer, may be null if none used
      * @return a consistent message for a HTTP related {@link AuthorizationException}
      */
+    // TODO Split when WAGON-568 is implemented
     public static String formatAuthorizationMessage( String url, int statusCode, String reasonPhrase,
                                                      ProxyInfo proxyInfo )
     {
         switch ( statusCode )
         {
             case SC_UNAUTHORIZED: // no credentials or auth was not valid
-                return formatMessage( "Authentication failed for ", url, statusCode, reasonPhrase, null );
+                return formatMessage( "authentication failed for ", url, statusCode, reasonPhrase, null );
 
             case SC_FORBIDDEN: // forbidden based on permissions usually
-                return formatMessage( "Authorization failed for ", url, statusCode, reasonPhrase, null );
+                return formatMessage( "authorization failed for ", url, statusCode, reasonPhrase, null );
 
             case SC_PROXY_AUTH_REQUIRED:
-                return formatMessage( "HTTP proxy server authentication failed for ", url, statusCode,
+                return formatMessage( "proxy authentication failed for ", url, statusCode,
                         reasonPhrase, null );
 
             default:
                 break;
         }
 
-        return formatMessage( "Authorization failed for ", url, statusCode, reasonPhrase, proxyInfo );
+        return formatMessage( "authorization failed for ", url, statusCode, reasonPhrase, proxyInfo );
     }
 
     /**
@@ -177,16 +182,18 @@ public static String formatAuthorizationMessage( String url, int statusCode, Str
     public static String formatResourceDoesNotExistMessage( String url, int statusCode, String reasonPhrase,
                                                             ProxyInfo proxyInfo )
     {
-        return formatMessage( "Resource missing at ", url, statusCode, reasonPhrase, proxyInfo );
+        return formatMessage( "resource missing at ", url, statusCode, reasonPhrase, proxyInfo );
     }
 
     private static String formatMessage( String message, String url, int statusCode, String reasonPhrase,
                                          ProxyInfo proxyInfo )
     {
+        Objects.requireNonNull( message, "message cannot be null" );
+        Objects.requireNonNull( url, "url cannot be null" );
         String msg = message + url;
         if ( statusCode != UNKNOWN_STATUS_CODE )
         {
-            msg += " " + statusCode;
+            msg += ", status: " + statusCode;
 
             if ( StringUtils.isNotEmpty( reasonPhrase ) )
             {
@@ -223,7 +230,7 @@ private static String formatMessage( String message, String url, int statusCode,
         }
         if ( proxyInfo != null )
         {
-            msg += " " + proxyInfo.toString();
+            msg += ", proxy: " + proxyInfo;
         }
         return msg;
     }
diff --git a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HttpMethodConfiguration.java b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HttpMethodConfiguration.java
index dcc1bd5..cae1e35 100755
--- a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HttpMethodConfiguration.java
+++ b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/HttpMethodConfiguration.java
@@ -27,7 +27,7 @@
 import java.util.Properties;
 
 /**
- * 
+ *
  */
 public class HttpMethodConfiguration
 {
@@ -158,12 +158,12 @@ HttpMethodConfiguration copy()
         copy.setReadTimeout( getReadTimeout() );
         if ( getHeaders() != null )
         {
-            copy.setHeaders( getHeaders() );
+            copy.getHeaders().putAll( getHeaders() );
         }
 
         if ( getParams() != null )
         {
-            copy.setParams( getParams() );
+            copy.getParams().putAll( getParams() );
         }
 
         copy.setUseDefaultHeaders( isUseDefaultHeaders() );
diff --git a/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/WagonRedirectStrategy.java b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/WagonRedirectStrategy.java
new file mode 100644
index 0000000..6694a38
--- /dev/null
+++ b/wagon-providers/wagon-http-shared/src/main/java/org/apache/maven/wagon/shared/http/WagonRedirectStrategy.java
@@ -0,0 +1,126 @@
+package org.apache.maven.wagon.shared.http;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.net.URI;
+
+import org.apache.http.HttpEntityEnclosingRequest;
+import org.apache.http.HttpRequest;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.ProtocolException;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.methods.HttpHead;
+import org.apache.http.client.methods.HttpPut;
+import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.client.methods.RequestBuilder;
+import org.apache.http.impl.client.DefaultRedirectStrategy;
+import org.apache.http.protocol.HttpContext;
+import org.apache.http.util.Args;
+import org.apache.maven.wagon.events.TransferEvent;
+import org.apache.maven.wagon.shared.http.AbstractHttpClientWagon.WagonHttpEntity;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * A custom redirect strategy for Apache Maven Wagon HttpClient.
+ *
+ * @since 3.4.0
+ *
+ */
+public class WagonRedirectStrategy extends DefaultRedirectStrategy
+{
+
+    private static final Logger LOGGER = LoggerFactory.getLogger( WagonRedirectStrategy.class );
+
+    private static final int SC_PERMANENT_REDIRECT = 308;
+
+    public WagonRedirectStrategy()
+    {
+        super( new String[] {
+                HttpGet.METHOD_NAME,
+                HttpHead.METHOD_NAME,
+                HttpPut.METHOD_NAME,
+                /**
+                 * This covers the most basic case where the redirection relocates to another
+                 * collection which has an existing parent collection.
+                 */
+                "MKCOL" } );
+    }
+
+    @Override
+    public boolean isRedirected( final HttpRequest request, final HttpResponse response,
+            final HttpContext context ) throws ProtocolException
+    {
+        Args.notNull( request, "HTTP request" );
+        Args.notNull( response, "HTTP response" );
+
+        final int statusCode = response.getStatusLine().getStatusCode();
+        final String method = request.getRequestLine().getMethod();
+        switch ( statusCode )
+        {
+        case HttpStatus.SC_MOVED_TEMPORARILY:
+        case HttpStatus.SC_MOVED_PERMANENTLY:
+        case HttpStatus.SC_SEE_OTHER:
+        case HttpStatus.SC_TEMPORARY_REDIRECT:
+        case SC_PERMANENT_REDIRECT:
+            return isRedirectable( method );
+        default:
+            return false;
+        }
+    }
+
+    @Override
+    public HttpUriRequest getRedirect( final HttpRequest request, final HttpResponse response,
+            final HttpContext context ) throws ProtocolException
+    {
+        final URI uri = getLocationURI( request, response, context );
+        if ( request instanceof HttpEntityEnclosingRequest )
+        {
+            HttpEntityEnclosingRequest encRequest = (HttpEntityEnclosingRequest) request;
+            if ( encRequest.getEntity() instanceof AbstractHttpClientWagon.WagonHttpEntity )
+            {
+                AbstractHttpClientWagon.WagonHttpEntity whe = (WagonHttpEntity) encRequest.getEntity();
+                if ( whe.getWagon() instanceof AbstractHttpClientWagon )
+                {
+                    // Re-execute AbstractWagon#firePutStarted(Resource, File)
+                    AbstractHttpClientWagon httpWagon = (AbstractHttpClientWagon) whe.getWagon();
+                    TransferEvent transferEvent =
+                            new TransferEvent( httpWagon, whe.getResource(),
+                                               TransferEvent.TRANSFER_STARTED, TransferEvent.REQUEST_PUT );
+                    transferEvent.setTimestamp( System.currentTimeMillis() );
+                    transferEvent.setLocalFile( whe.getSource() );
+                    httpWagon.getTransferEventSupport().fireDebug(
+                            String.format( "Following redirect from '%s' to '%s'",
+                                          request.getRequestLine().getUri(), uri.toASCIIString() ) );
+                    httpWagon.getTransferEventSupport().fireTransferStarted( transferEvent );
+                }
+                else
+                {
+                    LOGGER.warn( "Cannot properly handle redirect transfer event, wagon has unexpected class: {}",
+                                whe.getWagon().getClass() );
+                }
+            }
+        }
+
+        return RequestBuilder.copy( request ).setUri( uri ).build();
+    }
+
+}
diff --git a/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/EncodingUtilTest.java b/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/EncodingUtilTest.java
index 4ec549c..639ad1f 100644
--- a/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/EncodingUtilTest.java
+++ b/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/EncodingUtilTest.java
@@ -27,6 +27,13 @@
 public class EncodingUtilTest
     extends TestCase
 {
+    public void testEncodeURLWithTrailingSlash()
+    {
+        String encodedURL = EncodingUtil.encodeURLToString( "https://host:1234/test", "demo/" );
+
+        assertEquals( "https://host:1234/test/demo/", encodedURL );
+    }
+
     public void testEncodeURLWithSpaces()
         throws URISyntaxException, MalformedURLException
     {
@@ -115,4 +122,12 @@ public void testEncodeURLWithSlashes7()
 
         assertEquals( "file://host:1", encodedURL );
     }
+
+    public void testEncodeURLWithNonLatin()
+            throws URISyntaxException, MalformedURLException
+    {
+        String encodedURL = EncodingUtil.encodeURLToString( "file://host:1", "пипец/" );
+
+        assertEquals( "file://host:1/%D0%BF%D0%B8%D0%BF%D0%B5%D1%86/", encodedURL );
+    }
 }
diff --git a/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java b/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java
deleted file mode 100644
index 74df4d8..0000000
--- a/wagon-providers/wagon-http-shared/src/test/java/org/apache/maven/wagon/shared/http/HtmlFileListParserTest.java
+++ /dev/null
@@ -1,728 +0,0 @@
-package org.apache.maven.wagon.shared.http;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.List;
-
-import junit.framework.TestCase;
-
-import org.apache.maven.wagon.TransferFailedException;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * Unit Tests for the HtmlFileListParser
- */
-public class HtmlFileListParserTest
-    extends TestCase
-{
-    private static Logger logger = LoggerFactory.getLogger( HtmlFileListParserTest.class );
-
-    private void assertContainsExpected( List<String> links, String[] expected )
-    {
-        if ( expected.length != links.size() )
-        {
-            Collections.sort( links );
-            for ( String link : links )
-            {
-                logger.info("   \"" + link + "\", ");
-            }
-            assertEquals( "Links to Expected size", expected.length, links.size() );
-        }
-
-        for ( String exp : expected )
-        {
-            assertTrue( "Should find [" + exp + "] in link list", links.contains( exp ) );
-        }
-    }
-
-    private void assertNotContainingAvoided( List<String> links, String[] avoided )
-    {
-        for ( String a : avoided )
-        {
-            assertFalse( "Should not find [" + a + "] in link list", links.contains( a ) );
-        }
-    }
-
-    private List<String> parseLinks( String url, String filename )
-        throws TransferFailedException
-    {
-        InputStream is = this.getClass().getResourceAsStream( "/filelistings/" + filename );
-        List<String> files = HtmlFileListParser.parseFileList( url, is );
-
-        assertNotNull( "file list should not be null.", files );
-        assertFalse( "file list should not be empty.", files.isEmpty() );
-
-        /* Debug */
-        if ( false )
-        {
-            for ( String file : files )
-            {
-                logger.info( "File: '" + file + "'" );
-            }
-        }
-
-        return files;
-    }
-
-    /**
-     * Example showing jetty directory browsing of commons-lang 
-     * 
-     * @throws TransferFailedException
-     */
-    public void testParseCommonsLang()
-        throws TransferFailedException
-    {
-        List<String> links = parseLinks( "http://localhost/repository/commons-lang/commons-lang/2.3",
-                                             "commons-lang.html" );
-
-        String[] expected = new String[] {
-            "commons-lang-2.3-javadoc.jar",
-            "commons-lang-2.3-javadoc.jar.asc",
-            "commons-lang-2.3-javadoc.jar.md5",
-            "commons-lang-2.3-javadoc.jar.sha1",
-            "commons-lang-2.3-sources.jar",
-            "commons-lang-2.3-sources.jar.asc",
-            "commons-lang-2.3-sources.jar.md5",
-            "commons-lang-2.3-sources.jar.sha1",
-            "commons-lang-2.3.jar",
-            "commons-lang-2.3.jar.asc",
-            "commons-lang-2.3.jar.md5",
-            "commons-lang-2.3.jar.sha1",
-            "commons-lang-2.3.pom",
-            "commons-lang-2.3.pom.md5",
-            "commons-lang-2.3.pom.sha1",
-            "maven-metadata.xml",
-            "maven-metadata.xml.md5",
-            "maven-metadata.xml.sha1" };
-
-        assertContainsExpected( links, expected );
-
-        String[] avoided = new String[] { "../" };
-
-        assertNotContainingAvoided( links, avoided );
-    }
-
-    public void testParseIbiblio()
-        throws Exception
-    {
-        List<String> links = parseLinks( "http://www.ibiblio.org/maven2/org/apache/maven/wagon/",
-                                             "ibiblio-wagon.html" );
-
-        String[] expected = new String[] {
-            "wagon-1.0-alpha-2.pom",
-            "wagon-1.0-alpha-2.pom.asc",
-            "wagon-1.0-alpha-2.pom.md5",
-            "wagon-1.0-alpha-2.pom.sha1",
-            "wagon-1.0-alpha-3-20050413.021234-4.pom",
-            "wagon-1.0-alpha-3-20050413.021234-4.pom.md5",
-            "wagon-1.0-alpha-3-20050413.021234-4.pom.sha1",
-            "wagon-1.0-alpha-3-20050419.043745-5.pom",
-            "wagon-1.0-alpha-3-20050419.043745-5.pom.md5",
-            "wagon-1.0-alpha-3-20050419.043745-5.pom.sha1",
-            "wagon-1.0-alpha-3-20050419.044035-6.pom",
-            "wagon-1.0-alpha-3-20050419.044035-6.pom.md5",
-            "wagon-1.0-alpha-3-20050419.044035-6.pom.sha1",
-            "wagon-1.0-alpha-3-20050421.162738-7.pom",
-            "wagon-1.0-alpha-3-20050421.162738-7.pom.md5",
-            "wagon-1.0-alpha-3-20050421.162738-7.pom.sha1",
-            "wagon-1.0-alpha-3-20050422.075233-8.pom",
-            "wagon-1.0-alpha-3-20050422.075233-8.pom.md5",
-            "wagon-1.0-alpha-3-20050422.075233-8.pom.sha1",
-            "wagon-1.0-alpha-3-20050429.051847-9.pom",
-            "wagon-1.0-alpha-3-20050429.051847-9.pom.md5",
-            "wagon-1.0-alpha-3-20050429.051847-9.pom.sha1",
-            "wagon-file/",
-            "wagon-ftp/",
-            "wagon-http-lightweight/",
-            "wagon-http/",
-            "wagon-lightweight-http/",
-            "wagon-provider-api/",
-            "wagon-provider-test/",
-            "wagon-provider/",
-            "wagon-providers-1.0-alpha-2.pom",
-            "wagon-providers-1.0-alpha-2.pom.asc",
-            "wagon-providers-1.0-alpha-2.pom.md5",
-            "wagon-providers-1.0-alpha-2.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom",
-            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom",
-            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom",
-            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom",
-            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom",
-            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1",
-            "wagon-providers/",
-            "wagon-scm/",
-            "wagon-ssh-external/",
-            "wagon-ssh/",
-            "wagon-webdav/",
-            "wagon/" };
-
-        assertContainsExpected( links, expected );
-
-        String[] avoided = new String[] { "/org/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A", "?D=A", "?M=A", "?N=D", "?S=A" };
-
-        assertNotContainingAvoided( links, avoided );
-    }
-
-    /**
-     * Test of an html which is improperly formatted, and contains full host-specific paths to the resources.
-     * @throws Exception
-     */
-    public void testParseJetty()
-        throws Exception
-    {
-        List<String> links = parseLinks( "http://www.ibiblio.org/maven2/org/apache/maven/wagon/",
-                                             "jetty-wagon.html" );
-
-        String[] expected = new String[] {
-            "wagon-1.0-alpha-2.pom",
-            "wagon-1.0-alpha-2.pom.asc",
-            "wagon-1.0-alpha-2.pom.md5",
-            "wagon-1.0-alpha-2.pom.sha1",
-            "wagon-1.0-alpha-3-20050413.021234-4.pom",
-            "wagon-1.0-alpha-3-20050413.021234-4.pom.md5",
-            "wagon-1.0-alpha-3-20050413.021234-4.pom.sha1",
-            "wagon-1.0-alpha-3-20050419.043745-5.pom",
-            "wagon-1.0-alpha-3-20050419.043745-5.pom.md5",
-            "wagon-1.0-alpha-3-20050419.043745-5.pom.sha1",
-            "wagon-1.0-alpha-3-20050419.044035-6.pom",
-            "wagon-1.0-alpha-3-20050419.044035-6.pom.md5",
-            "wagon-1.0-alpha-3-20050419.044035-6.pom.sha1",
-            "wagon-1.0-alpha-3-20050421.162738-7.pom",
-            "wagon-1.0-alpha-3-20050421.162738-7.pom.md5",
-            "wagon-1.0-alpha-3-20050421.162738-7.pom.sha1",
-            "wagon-1.0-alpha-3-20050422.075233-8.pom",
-            "wagon-1.0-alpha-3-20050422.075233-8.pom.md5",
-            "wagon-1.0-alpha-3-20050422.075233-8.pom.sha1",
-            "wagon-1.0-alpha-3-20050429.051847-9.pom",
-            "wagon-1.0-alpha-3-20050429.051847-9.pom.md5",
-            "wagon-1.0-alpha-3-20050429.051847-9.pom.sha1",
-            "wagon-file/",
-            "wagon-ftp/",
-            "wagon-http-lightweight/",
-            "wagon-http/",
-            "wagon-lightweight-http/",
-            "wagon-provider-api/",
-            "wagon-provider-test/",
-            "wagon-provider/",
-            "wagon-providers-1.0-alpha-2.pom",
-            "wagon-providers-1.0-alpha-2.pom.asc",
-            "wagon-providers-1.0-alpha-2.pom.md5",
-            "wagon-providers-1.0-alpha-2.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom",
-            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom",
-            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom",
-            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom",
-            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom",
-            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1",
-            "wagon-providers/",
-            "wagon-scm/",
-            "wagon-ssh-external/",
-            "wagon-ssh/",
-            "wagon-webdav/",
-            "wagon/" };
-
-        assertContainsExpected( links, expected );
-
-        String[] avoided = new String[] { "/org/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A" };
-
-        assertNotContainingAvoided( links, avoided );
-    }
-
-    /**
-     * Test of an html which is improperly formatted, contains full host-specific paths to the resources and uses non-normalized base URI
-     * @throws Exception
-     */
-    public void testParseJettyWithNonNormalizedBaseURI()
-        throws Exception
-    {
-        List<String> links = parseLinks( "http://www.ibiblio.org/maven2/org/apache/maven/wagon//",
-                                             "jetty-wagon.html" );
-
-        String[] expected = new String[] {
-            "wagon-1.0-alpha-2.pom",
-            "wagon-1.0-alpha-2.pom.asc",
-            "wagon-1.0-alpha-2.pom.md5",
-            "wagon-1.0-alpha-2.pom.sha1",
-            "wagon-1.0-alpha-3-20050413.021234-4.pom",
-            "wagon-1.0-alpha-3-20050413.021234-4.pom.md5",
-            "wagon-1.0-alpha-3-20050413.021234-4.pom.sha1",
-            "wagon-1.0-alpha-3-20050419.043745-5.pom",
-            "wagon-1.0-alpha-3-20050419.043745-5.pom.md5",
-            "wagon-1.0-alpha-3-20050419.043745-5.pom.sha1",
-            "wagon-1.0-alpha-3-20050419.044035-6.pom",
-            "wagon-1.0-alpha-3-20050419.044035-6.pom.md5",
-            "wagon-1.0-alpha-3-20050419.044035-6.pom.sha1",
-            "wagon-1.0-alpha-3-20050421.162738-7.pom",
-            "wagon-1.0-alpha-3-20050421.162738-7.pom.md5",
-            "wagon-1.0-alpha-3-20050421.162738-7.pom.sha1",
-            "wagon-1.0-alpha-3-20050422.075233-8.pom",
-            "wagon-1.0-alpha-3-20050422.075233-8.pom.md5",
-            "wagon-1.0-alpha-3-20050422.075233-8.pom.sha1",
-            "wagon-1.0-alpha-3-20050429.051847-9.pom",
-            "wagon-1.0-alpha-3-20050429.051847-9.pom.md5",
-            "wagon-1.0-alpha-3-20050429.051847-9.pom.sha1",
-            "wagon-file/",
-            "wagon-ftp/",
-            "wagon-http-lightweight/",
-            "wagon-http/",
-            "wagon-lightweight-http/",
-            "wagon-provider-api/",
-            "wagon-provider-test/",
-            "wagon-provider/",
-            "wagon-providers-1.0-alpha-2.pom",
-            "wagon-providers-1.0-alpha-2.pom.asc",
-            "wagon-providers-1.0-alpha-2.pom.md5",
-            "wagon-providers-1.0-alpha-2.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom",
-            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom",
-            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom",
-            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom",
-            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom",
-            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1",
-            "wagon-providers/",
-            "wagon-scm/",
-            "wagon-ssh-external/",
-            "wagon-ssh/",
-            "wagon-webdav/",
-            "wagon/" };
-
-        assertContainsExpected( links, expected );
-
-        String[] avoided = new String[] { "/org/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A" };
-
-        assertNotContainingAvoided( links, avoided );
-    }
-
-    /**
-     * Using repository.codehaus.org output as an example.
-     * This is an example of an older RHEL installation of apache httpd with old fancy indexing output
-     * This example tests how to detect directories properly.
-     * 
-     * @throws TransferFailedException
-     */
-    public void testParseMevenIde()
-        throws TransferFailedException
-    {
-        List<String> links = parseLinks( "http://repository.codehaus.org/org/codehaus/mevenide/", "mevenide.html" );
-
-        String[] expected = new String[] {
-            "apisupport/",
-            "autoupdate/",
-            "continuum-rpc/",
-            "continuum/",
-            "debugger-bridge/",
-            "deployment-bridge/",
-            "feature/",
-            "grammar/",
-            "ide-mojos/",
-            "indexer/",
-            "j2ee/",
-            "junit/",
-            "maven-metadata.xml",
-            "maven-metadata.xml.md5",
-            "maven-metadata.xml.sha1",
-            "mevenide2-parent/",
-            "nb-mvn-embedder/",
-            "nb-project/",
-            "nb-repo-browser/",
-            "netbeans-debugger-plugin/",
-            "netbeans-deploy-plugin/",
-            "netbeans-libs/",
-            "netbeans-nbmreload-plugin/",
-            "netbeans-repository/",
-            "netbeans-run-plugin/",
-            "netbeans/",
-            "persistence/",
-            "plugin-bridges/",
-            "plugins/",
-            "reload-nbm-bridge/",
-            "run-jar-bridge/" };
-
-        assertContainsExpected( links, expected );
-
-        String[] avoided = new String[] { "/org/codehaus/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A" };
-
-        assertNotContainingAvoided( links, avoided );
-    }
-
-    public void testParseMirror()
-        throws Exception
-    {
-        List<String> links = parseLinks( "http://www.ibiblio.org/maven2/org/apache/maven/wagon/",
-                                             "mirror-wagon.html" );
-
-        String[] expected = new String[] {
-            "wagon-1.0-alpha-2.pom",
-            "wagon-1.0-alpha-2.pom.asc",
-            "wagon-1.0-alpha-2.pom.md5",
-            "wagon-1.0-alpha-2.pom.sha1",
-            "wagon-1.0-alpha-3-20050413.021234-4.pom",
-            "wagon-1.0-alpha-3-20050413.021234-4.pom.md5",
-            "wagon-1.0-alpha-3-20050413.021234-4.pom.sha1",
-            "wagon-1.0-alpha-3-20050419.043745-5.pom",
-            "wagon-1.0-alpha-3-20050419.043745-5.pom.md5",
-            "wagon-1.0-alpha-3-20050419.043745-5.pom.sha1",
-            "wagon-1.0-alpha-3-20050419.044035-6.pom",
-            "wagon-1.0-alpha-3-20050419.044035-6.pom.md5",
-            "wagon-1.0-alpha-3-20050419.044035-6.pom.sha1",
-            "wagon-1.0-alpha-3-20050421.162738-7.pom",
-            "wagon-1.0-alpha-3-20050421.162738-7.pom.md5",
-            "wagon-1.0-alpha-3-20050421.162738-7.pom.sha1",
-            "wagon-1.0-alpha-3-20050422.075233-8.pom",
-            "wagon-1.0-alpha-3-20050422.075233-8.pom.md5",
-            "wagon-1.0-alpha-3-20050422.075233-8.pom.sha1",
-            "wagon-1.0-alpha-3-20050429.051847-9.pom",
-            "wagon-1.0-alpha-3-20050429.051847-9.pom.md5",
-            "wagon-1.0-alpha-3-20050429.051847-9.pom.sha1",
-            "wagon-file/",
-            "wagon-ftp/",
-            "wagon-http-lightweight/",
-            "wagon-http/",
-            "wagon-lightweight-http/",
-            "wagon-provider-api/",
-            "wagon-provider-test/",
-            "wagon-provider/",
-            "wagon-providers-1.0-alpha-2.pom",
-            "wagon-providers-1.0-alpha-2.pom.asc",
-            "wagon-providers-1.0-alpha-2.pom.md5",
-            "wagon-providers-1.0-alpha-2.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom",
-            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050407.202848-1.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom",
-            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050419.044035-2.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom",
-            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050421.162738-3.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom",
-            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050422.075233-4.pom.sha1",
-            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom",
-            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.md5",
-            "wagon-providers-1.0-alpha-3-20050429.051847-5.pom.sha1",
-            "wagon-providers/",
-            "wagon-scm/",
-            "wagon-ssh-external/",
-            "wagon-ssh/",
-            "wagon-webdav/",
-            "wagon/" };
-
-        assertContainsExpected( links, expected );
-
-        String[] avoided = new String[] {
-            "/org/codehaus/",
-            "?C=S;O=A",
-            "?C=D;O=A",
-            "?C=M;O=A",
-            "mailto:mirror.admin@mirror.com" };
-
-        assertNotContainingAvoided( links, avoided );
-    }
-
-    /**
-     * Example of output from repo1.maven.org
-     * This example is of nekohtml specifically.
-     * 
-     * @throws TransferFailedException
-     */
-    public void testParseNekoHtml()
-        throws TransferFailedException
-    {
-        List<String> links = parseLinks( "http://repo1.maven.org//maven2/nekohtml/nekohtml/1.9.6/", "nekohtml.html" );
-
-        String[] expected = new String[] {
-            "nekohtml-1.9.6-javadoc.jar",
-            "nekohtml-1.9.6-javadoc.jar.md5",
-            "nekohtml-1.9.6-javadoc.jar.sha1",
-            "nekohtml-1.9.6-sources.jar",
-            "nekohtml-1.9.6-sources.jar.md5",
-            "nekohtml-1.9.6-sources.jar.sha1",
-            "nekohtml-1.9.6.jar",
-            "nekohtml-1.9.6.jar.md5",
-            "nekohtml-1.9.6.jar.sha1",
-            "nekohtml-1.9.6.pom",
-            "nekohtml-1.9.6.pom.md5",
-            "nekohtml-1.9.6.pom.sha1" };
-
-        assertContainsExpected( links, expected );
-
-        String[] avoided = new String[] { "/maven2/nekohtml/nekohtml/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A" };
-
-        assertNotContainingAvoided( links, avoided );
-    }
-
-    /**
-     * Example of detecting directories on repo1.maven.org
-     * 
-     * @throws TransferFailedException
-     */
-    public void testParseNetSourceforge()
-        throws TransferFailedException
-    {
-        List<String> links = parseLinks( "http://repo1.maven.org/maven2/net/sf/", "net_sf.html" );
-
-        String[] expected = new String[] {
-            "a2j/",
-            "aislib/",
-            "alchim/",
-            "antenna/",
-            "apt-jelly/",
-            "beanlib/",
-            "bluecove/",
-            "buildbox/",
-            "click/",
-            "clirr/",
-            "datavision/",
-            "dozer/",
-            "dtddoc/",
-            "dynpageplus/",
-            "ehcache/",
-            "ezmorph/",
-            "falcon/",
-            "grester/",
-            "gwt-widget/",
-            "hermesftp/",
-            "hibernate/",
-            "jcharts/",
-            "jdatabaseimport/",
-            "jeceira/",
-            "jfcunit/",
-            "jfig/",
-            "jguard/",
-            "jipcam/",
-            "jlynx/",
-            "jour/",
-            "jpf/",
-            "json-lib/",
-            "jsptest/",
-            "jsr107cache/",
-            "jt400/",
-            "jxls/",
-            "kxml/",
-            "ldaptemplate/",
-            "locale4j/",
-            "mapasuta/",
-            "maven-har/",
-            "maven-sar/",
-            "opencsv/",
-            "oval/",
-            "proguard/",
-            "qdwizard/",
-            "resultsetmapper/",
-            "retrotranslator/",
-            "saxon/",
-            "shadesdb/",
-            "smc/",
-            "speculoos/",
-            "springlayout/",
-            "stat-scm/",
-            "statsvn/",
-            "stax/",
-            "struts/",
-            "tacos/",
-            "testextensions/",
-            "webdav-servlet/" };
-
-        assertContainsExpected( links, expected );
-
-        String[] avoided = new String[] { "/maven2/net/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A" };
-
-        assertNotContainingAvoided( links, avoided );
-    }
-
-    /**
-     * Another larger example of the directory link detection on repository.codehaus.org
-     * 
-     * @throws TransferFailedException
-     */
-    public void testParseOrgCodehaus()
-        throws TransferFailedException
-    {
-        List<String> links = parseLinks( "http://repository.codehaus.org/org/codehaus", "org.codehaus.html" );
-
-        String[] expected = new String[] {
-            "agilifier/",
-            "benji/",
-            "bruce/",
-            "btm/",
-            "cargo/",
-            "castor-spring/",
-            "castor/",
-            "cozmos/",
-            "dataforge/",
-            "dimple/",
-            "droolsdotnet/",
-            "enunciate/",
-            "fabric3/",
-            "gant/",
-            "grails-plugins/",
-            "groovy/",
-            "gsoc/",
-            "guessencoding/",
-            "gumtree/",
-            "gwt-openlayers/",
-            "haus/",
-            "izpack/",
-            "javasim/",
-            "jedi/",
-            "jequel/",
-            "jet/",
-            "jettison/",
-            "jfdi/",
-            "jikesrvm/",
-            "jra/",
-            "jremoting/",
-            "jtestme/",
-            "jtestr/",
-            "labs-ng/",
-            "logicabyss/",
-            "marionette/",
-            "mevenide/",
-            "modello/",
-            "mojo/",
-            "mvel/",
-            "mvflex/",
-            "native-mojo/",
-            "openim/",
-            "plexus/",
-            "polymap/",
-            "prometheus/",
-            "prophit/",
-            "quaere/",
-            "redback/",
-            "rulessandpit/",
-            "rvm/",
-            "savana/",
-            "scala-ide/",
-            "senro/",
-            "sonar/",
-            "staxmate/",
-            "stomp/",
-            "svn4j/",
-            "swiby/",
-            "swizzle/",
-            "sxc/",
-            "testdox/",
-            "wadi/",
-            "waffle/",
-            "woodstox/",
-            "xdoclet/",
-            "xfire/",
-            "xharness/",
-            "xsite/",
-            "xstream/",
-            "xwire/" };
-
-        assertContainsExpected( links, expected );
-
-        String[] avoided = new String[] { "/org/", "?C=S;O=A", "?C=D;O=A", "?C=M;O=A" };
-
-        assertNotContainingAvoided( links, avoided );
-    }
-
-    /**
-     * Test the output found from apache httpd with fancy indexing and dav module.
-     * Using people.apache.org output as source material.
-     * 
-     * @throws TransferFailedException
-     */
-    public void testParsePeopleApacheOrg()
-        throws TransferFailedException
-    {
-        List<String> links = parseLinks(
-                                             "http://people.apache.org/repo/m2-ibiblio-rsync-repository/org/apache/maven/archiva/archiva-plexus-runtime/1.0.1/",
-                                             "org.apache.maven.html" );
-
-        String[] expected = new String[] {
-            "archiva-plexus-runtime-1.0.1-bin.tar.gz",
-            "archiva-plexus-runtime-1.0.1-bin.tar.gz.asc",
-            "archiva-plexus-runtime-1.0.1-bin.tar.gz.asc.md5",
-            "archiva-plexus-runtime-1.0.1-bin.tar.gz.asc.sha1",
-            "archiva-plexus-runtime-1.0.1-bin.tar.gz.md5",
-            "archiva-plexus-runtime-1.0.1-bin.tar.gz.sha1",
-            "archiva-plexus-runtime-1.0.1-bin.zip",
-            "archiva-plexus-runtime-1.0.1-bin.zip.asc",
-            "archiva-plexus-runtime-1.0.1-bin.zip.asc.md5",
-            "archiva-plexus-runtime-1.0.1-bin.zip.asc.sha1",
-            "archiva-plexus-runtime-1.0.1-bin.zip.md5",
-            "archiva-plexus-runtime-1.0.1-bin.zip.sha1",
-            "archiva-plexus-runtime-1.0.1-sources.jar",
-            "archiva-plexus-runtime-1.0.1-sources.jar.asc",
-            "archiva-plexus-runtime-1.0.1-sources.jar.asc.md5",
-            "archiva-plexus-runtime-1.0.1-sources.jar.asc.sha1",
-            "archiva-plexus-runtime-1.0.1-sources.jar.md5",
-            "archiva-plexus-runtime-1.0.1-sources.jar.sha1",
-            "archiva-plexus-runtime-1.0.1.jar",
-            "archiva-plexus-runtime-1.0.1.jar.asc",
-            "archiva-plexus-runtime-1.0.1.jar.asc.md5",
-            "archiva-plexus-runtime-1.0.1.jar.asc.sha1",
-            "archiva-plexus-runtime-1.0.1.jar.md5",
-            "archiva-plexus-runtime-1.0.1.jar.sha1",
-            "archiva-plexus-runtime-1.0.1.pom",
-            "archiva-plexus-runtime-1.0.1.pom.asc",
-            "archiva-plexus-runtime-1.0.1.pom.asc.md5",
-            "archiva-plexus-runtime-1.0.1.pom.asc.sha1",
-            "archiva-plexus-runtime-1.0.1.pom.md5",
-            "archiva-plexus-runtime-1.0.1.pom.sha1",
-            "readme artifacts.txt"};
-
-        assertContainsExpected( links, expected );
-
-        String[] avoided = new String[] {
-            "/repo/m2-ibiblio-rsync-repository/org/apache/maven/archiva/archiva-plexus-runtime/",
-            "?C=S;O=A",
-            "?C=D;O=A",
-            "?C=M;O=A" };
-
-        assertNotContainingAvoided( links, avoided );
-    }
-}
diff --git a/wagon-providers/wagon-http/pom.xml b/wagon-providers/wagon-http/pom.xml
index a49e159..eafb18a 100644
--- a/wagon-providers/wagon-http/pom.xml
+++ b/wagon-providers/wagon-http/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon-providers</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
@@ -124,7 +124,6 @@ under the License.
                   <include>org.apache.httpcomponents:httpcore</include>
                   <include>commons-codec:commons-codec</include>
                   <include>commons-io:commons-io</include>
-                  <include>org.jsoup:jsoup</include>
                   <include>org.apache.maven.wagon:wagon-http-shared</include>
                 </includes>
               </artifactSet>
@@ -139,10 +138,6 @@ under the License.
                   <pattern>org.apache.commons.io</pattern>
                   <shadedPattern>org.apache.maven.wagon.providers.http.commons.io</shadedPattern>
                 </relocation>
-                <relocation>
-                  <pattern>org.jsoup</pattern>
-                  <shadedPattern>org.apache.maven.wagon.providers.http.org.jsoup</shadedPattern>
-                </relocation>
                 <relocation>
                   <pattern>org.apache.http</pattern>
                   <shadedPattern>org.apache.maven.wagon.providers.http.httpclient</shadedPattern>
diff --git a/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java b/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
old mode 100755
new mode 100644
index 9d53729..ee65c99
--- a/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
+++ b/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
@@ -19,25 +19,7 @@
  * under the License.
  */
 
-import org.apache.http.HttpEntity;
-import org.apache.http.HttpException;
-import org.apache.http.HttpStatus;
-import org.apache.http.client.methods.CloseableHttpResponse;
-import org.apache.http.client.methods.HttpGet;
-import org.apache.maven.wagon.ResourceDoesNotExistException;
-import org.apache.maven.wagon.TransferFailedException;
-import org.apache.maven.wagon.authorization.AuthorizationException;
 import org.apache.maven.wagon.shared.http.AbstractHttpClientWagon;
-import org.apache.maven.wagon.shared.http.HtmlFileListParser;
-import org.apache.maven.wagon.shared.http.HttpMessageUtils;
-
-import java.io.IOException;
-import java.util.Collections;
-import java.util.List;
-
-import static org.apache.maven.wagon.shared.http.HttpMessageUtils.formatResourceDoesNotExistMessage;
-import static org.apache.maven.wagon.shared.http.HttpMessageUtils.formatTransferDebugMessage;
-import static org.apache.maven.wagon.shared.http.HttpMessageUtils.formatTransferFailedMessage;
 
 /**
  * @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
@@ -46,85 +28,4 @@ public class HttpWagon
     extends AbstractHttpClientWagon
 {
 
-    public List<String> getFileList( String destinationDirectory )
-        throws AuthorizationException, ResourceDoesNotExistException, TransferFailedException
-    {
-        return getFileList( getInitialBackoffSeconds(), destinationDirectory );
-    }
-
-    private List<String> getFileList( int wait, String destinationDirectory )
-        throws TransferFailedException, ResourceDoesNotExistException, AuthorizationException
-    {
-        if ( destinationDirectory.length() > 0 && !destinationDirectory.endsWith( "/" ) )
-        {
-            destinationDirectory += "/";
-        }
-
-        String url = getRepository().getUrl() + "/" + destinationDirectory;
-
-        HttpGet getMethod = new HttpGet( url );
-
-        try
-        {
-            CloseableHttpResponse response = execute( getMethod );
-            try
-            {
-                String reasonPhrase = response.getStatusLine().getReasonPhrase();
-                int statusCode = response.getStatusLine().getStatusCode();
-
-                fireTransferDebug( formatTransferDebugMessage( url, statusCode, reasonPhrase, getProxyInfo() ) );
-
-                switch ( statusCode )
-                {
-                    case HttpStatus.SC_OK:
-                        break;
-
-                    case HttpStatus.SC_FORBIDDEN:
-                    case HttpStatus.SC_UNAUTHORIZED:
-                    case HttpStatus.SC_PROXY_AUTHENTICATION_REQUIRED:
-                        throw new AuthorizationException( HttpMessageUtils.formatAuthorizationMessage( url, statusCode,
-                                reasonPhrase, getProxyInfo() ) );
-
-                    case HttpStatus.SC_NOT_FOUND:
-                        throw new ResourceDoesNotExistException( formatResourceDoesNotExistMessage( url, statusCode,
-                                reasonPhrase, getProxyInfo() ) );
-
-                    case SC_TOO_MANY_REQUESTS:
-                        return getFileList( backoff( wait, url ), destinationDirectory );
-
-                    //add more entries here
-                    default:
-                        throw new TransferFailedException( formatTransferFailedMessage( url, statusCode, reasonPhrase,
-                                getProxyInfo() ) );
-                }
-                HttpEntity entity = response.getEntity();
-                if ( entity != null )
-                {
-                    return HtmlFileListParser.parseFileList( url, entity.getContent() );
-                }
-                else
-                {
-                    return Collections.emptyList();
-                }
-
-            }
-            finally
-            {
-                response.close();
-            }
-        }
-        catch ( IOException e )
-        {
-            throw new TransferFailedException( "Could not read response body.", e );
-        }
-        catch ( HttpException e )
-        {
-            throw new TransferFailedException( "Could not read response body.", e );
-        }
-        catch ( InterruptedException e )
-        {
-            throw new TransferFailedException( "Unable to wait for resource.", e );
-        }
-    }
-
 }
diff --git a/wagon-providers/wagon-http/src/site/apt/index.apt b/wagon-providers/wagon-http/src/site/apt/index.apt
index 12ccf46..1c9f864 100644
--- a/wagon-providers/wagon-http/src/site/apt/index.apt
+++ b/wagon-providers/wagon-http/src/site/apt/index.apt
@@ -25,12 +25,12 @@
  ~~ under the License.
 
  ~~ NOTE: For help with the syntax of this file, see:
- ~~ http://maven.apache.org/doxia/references/apt-format.html
+ ~~ https://maven.apache.org/doxia/references/apt-format.html
 
 Maven Wagon HTTP
 
  This component is an implementation of Wagon provider for HTTP access.
- It uses {{{http://hc.apache.org/httpcomponents-client-ga/}Apache HttpComponents client}} as lower level layer.
+ It uses {{{https://hc.apache.org/httpcomponents-client-4.5.x/}Apache HttpComponents Client 4.5.x}} as lower level layer.
 
  It enables Maven to use remote repositories stored in HTTP servers.
 
@@ -50,11 +50,11 @@ Features
 
  Other features can be configured through system properties:
 
- * <<<maven.wagon.http.ssl.insecure>>> = true/false (default false), enable/disable use of relaxed ssl check for user generated certificates.
+ * <<<maven.wagon.http.ssl.insecure>>> = <<<true>>>/<<<false>>> (<<<false>>> by default), enable/disable relaxed check of public key certificates (e.g. self-signed ones). Relaxed check means that any chain with 1 or more certificates will be considered valid if all the certificate dates in the chain are valid (dates check can be overridden as well - see below). Setting it to <<<true>>> also enables usage of the following properties:
 
- * <<<maven.wagon.http.ssl.allowall>>> = true/false (default false), enable/disable match of the server's X.509 certificate with hostname. If disabled, a browser like check will be used.
+    * <<<maven.wagon.http.ssl.allowall>>> = <<<true>>>/<<<false>>> (<<<false>>> by default), whether to match the server's X.509 certificate against a requested IP/DNS name. If <<<false>>>/unset, a regular server check will be used, which means that the server's IP/DNS must match either the first CN, the Subject field or one of the Subject Alternative Name extension values (in case Subject or SAN type is either <<<dNSName>>> or <<<iPAddress>>> - see {{{https://tools.ietf.org/html/rfc5280}RFC 5280 for more details}}). Otherwise, no such matching will be applied.
 
- * <<<maven.wagon.http.ssl.ignore.validity.dates>>> = true/false (default false), ignore issues with certificate dates.
+    * <<<maven.wagon.http.ssl.ignore.validity.dates>>> = <<<true>>>/<<<false>>> (<<<false>>> by default), whether to ignore issues with certificate dates (i.e. when a certificate is expired or not yet valid).
 
  * <<<maven.wagon.rto>>> = time in ms (default 1800000), read time out.
 
@@ -64,15 +64,22 @@ Features
 
  * <<<maven.wagon.http.retryHandler.class>>> supports this set of values:
 
-    * <<<default>>> will use an instance of {{{http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.html}<<<DefaultHttpRequestRetryHandler>>>}} respecting <<<requestSentEnabled>>>, <<<count>>> and <<<nonRetryableClasses>>>.
+    * <<<default>>> will use an instance of {{{https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.html}<<<DefaultHttpRequestRetryHandler>>>}} respecting <<<requestSentEnabled>>>, <<<count>>> and <<<nonRetryableClasses>>>.
 
-    *<< <standard>>> will use an instance of {{{http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/client/StandardHttpRequestRetryHandler.html}<<<StandardHttpRequestRetryHandler>>>}} respecting <<<requestSentEnabled>>> and <<<count>>>.
+    * <<<standard>>> will use an instance of {{{https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/StandardHttpRequestRetryHandler.html}<<<StandardHttpRequestRetryHandler>>>}} respecting <<<requestSentEnabled>>> and <<<count>>>.
 
-    * Any fully qualified name of a {{{https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/client/HttpRequestRetryHandler.html}<<<HttpRequestRetryHandler>>>}} implementation will be instantiated with its default constructor.
+    * Any fully qualified name of a {{{https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/client/HttpRequestRetryHandler.html}<<<HttpRequestRetryHandler>>>}} implementation will be instantiated with its default constructor.
+
+        [Attention] This will not work with the shaded version bundled with Maven.
 
  * <<<maven.wagon.http.retryHandler.requestSentEnabled>>> = <<<requestSentEnabled>>> for <<<default>>> or <<<standard>>> implementations.
 
  * <<<maven.wagon.http.retryHandler.count>>> = number of retries for <<<default>>> or <<<standard>>> implementations.
 
  * <<<maven.wagon.http.retryHandler.nonRetryableClasses>>> = a comma-separated list of fully qualified class names bypassing the retries (only the <<<default>>> implementation).
- If not set, the default value from {{{http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.html}<<<DefaultHttpRequestRetryHandler>>>}} will be used.
+ If not set, the default value from {{{https://hc.apache.org/httpcomponents-client-4.5.x/httpclient/apidocs/org/apache/http/impl/client/DefaultHttpRequestRetryHandler.html}<<<DefaultHttpRequestRetryHandler>>>}} will be used.
+
+ []
+
+        [Attention] Any retry handler can only react to exceptions when executing the request and receiving the response head.
+                    It will <not> salvage in-flight failures of ongoing response body streams.
diff --git a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/ErrorWithMessageServlet.java b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/ErrorWithMessageServlet.java
index bf74118..1d76412 100644
--- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/ErrorWithMessageServlet.java
+++ b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/ErrorWithMessageServlet.java
@@ -40,23 +40,23 @@ public class ErrorWithMessageServlet
     public void service( HttpServletRequest request, HttpServletResponse response )
         throws ServletException, IOException
     {
-        if ( request.getRequestURL().toString().contains( "401" ) )
+        if ( request.getPathInfo().endsWith( "/401" ) )
         {
             response.sendError( 401, MESSAGE );
         }
-        else if ( request.getRequestURL().toString().contains( "403" ) )
+        else if ( request.getPathInfo().endsWith( "/403" ) )
         {
             response.sendError( 403, MESSAGE );
         }
-        else if ( request.getRequestURL().toString().contains( "404" ) )
+        else if ( request.getPathInfo().endsWith( "/404" ) )
         {
             response.sendError( 404, MESSAGE );
         }
-        else if ( request.getRequestURL().toString().contains( "407" ) )
+        else if ( request.getPathInfo().endsWith( "/407" ) )
         {
             response.sendError( 407, MESSAGE );
         }
-        else if ( request.getRequestURL().toString().contains( "500" ) )
+        else if ( request.getPathInfo().endsWith( "/500" ) )
         {
             response.sendError( 500, MESSAGE );
         }
diff --git a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpClientWagonTest.java b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpClientWagonTest.java
index 692c00d..30ff6ac 100755
--- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpClientWagonTest.java
+++ b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpClientWagonTest.java
@@ -68,7 +68,6 @@ public void testDefaultHeadersUsedByDefault()
 
         // these are the default headers.
         // method.addRequestHeader( "Cache-control", "no-cache" );
-        // method.addRequestHeader( "Cache-store", "no-store" );
         // method.addRequestHeader( "Pragma", "no-cache" );
         // "Accept-Encoding" is automatically set by HttpClient at runtime
 
@@ -76,10 +75,6 @@ public void testDefaultHeadersUsedByDefault()
         assertNotNull( header );
         assertEquals( "no-cache", header.getValue() );
 
-        header = method.getFirstHeader( "Cache-store" );
-        assertNotNull( header );
-        assertEquals( "no-store", header.getValue() );
-
         header = method.getFirstHeader( "Pragma" );
         assertNotNull( header );
         assertEquals( "no-cache", header.getValue() );
@@ -98,15 +93,11 @@ public void testTurnOffDefaultHeaders()
 
         // these are the default headers.
         // method.addRequestHeader( "Cache-control", "no-cache" );
-        // method.addRequestHeader( "Cache-store", "no-store" );
         // method.addRequestHeader( "Pragma", "no-cache" );
 
         Header header = method.getFirstHeader( "Cache-control" );
         assertNull( header );
 
-        header = method.getFirstHeader( "Cache-store" );
-        assertNull( header );
-
         header = method.getFirstHeader( "Pragma" );
         assertNull( header );
     }
diff --git a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonErrorTest.java b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonErrorTest.java
index 63dd944..17b4e5a 100644
--- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonErrorTest.java
+++ b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonErrorTest.java
@@ -79,7 +79,7 @@ public void testGet401()
 
         assertNotNull( thrown );
         assertEquals( AuthorizationException.class, thrown.getClass() );
-        assertEquals( "Authentication failed for http://localhost:" + serverPort + "/401 401 "
+        assertEquals( "authentication failed for http://localhost:" + serverPort + "/401, status: 401 "
             + ErrorWithMessageServlet.MESSAGE, thrown.getMessage() );
     }
 
@@ -115,7 +115,7 @@ public void testGet403()
 
         assertNotNull( thrown );
         assertEquals( AuthorizationException.class, thrown.getClass() );
-        assertEquals( "Authorization failed for http://localhost:" + serverPort + "/403 403 "
+        assertEquals( "authorization failed for http://localhost:" + serverPort + "/403, status: 403 "
             + ErrorWithMessageServlet.MESSAGE, thrown.getMessage() );
     }
 
@@ -151,7 +151,7 @@ public void testGet404()
 
         assertNotNull( thrown );
         assertEquals( ResourceDoesNotExistException.class, thrown.getClass() );
-        assertEquals( "Resource missing at http://localhost:" + serverPort + "/404 404 "
+        assertEquals( "resource missing at http://localhost:" + serverPort + "/404, status: 404 "
             + ErrorWithMessageServlet.MESSAGE, thrown.getMessage() );
     }
 
@@ -187,7 +187,7 @@ public void testGet407()
 
         assertNotNull( thrown );
         assertEquals( AuthorizationException.class, thrown.getClass() );
-        assertEquals( "HTTP proxy server authentication failed for http://localhost:" + serverPort + "/407 407 "
+        assertEquals( "proxy authentication failed for http://localhost:" + serverPort + "/407, status: 407 "
             + ErrorWithMessageServlet.MESSAGE, thrown.getMessage() );
     }
 
@@ -223,7 +223,7 @@ public void testGet500()
 
         assertNotNull( thrown );
         assertEquals( TransferFailedException.class, thrown.getClass() );
-        assertEquals( "Transfer failed for http://localhost:" + serverPort + "/500 500 "
+        assertEquals( "transfer failed for http://localhost:" + serverPort + "/500, status: 500 "
             + ErrorWithMessageServlet.MESSAGE, thrown.getMessage() );
     }
 }
diff --git a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTest.java b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTest.java
index f872147..2aeb3a0 100755
--- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTest.java
+++ b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTest.java
@@ -42,12 +42,13 @@ protected String getTestRepositoryUrl()
         return getProtocol() + "://localhost:" + getTestRepositoryPort();
     }
 
-    protected void setHttpHeaders( StreamingWagon wagon, Properties properties )
+    protected void setHttpConfiguration( StreamingWagon wagon, Properties headers, Properties params )
     {
         HttpConfiguration config = new HttpConfiguration();
 
         HttpMethodConfiguration methodConfiguration = new HttpMethodConfiguration();
-        methodConfiguration.setHeaders( properties );
+        methodConfiguration.setHeaders( headers );
+        methodConfiguration.setParams( params );
         config.setAll( methodConfiguration );
         ( (HttpWagon) wagon ).setHttpConfiguration( config );
     }
diff --git a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTimeoutTest.java b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTimeoutTest.java
index 553576f..71a8c9a 100644
--- a/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTimeoutTest.java
+++ b/wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpWagonTimeoutTest.java
@@ -112,38 +112,6 @@ public void testResourceExits()
         assertEquals( TransferFailedException.class, thrown.getClass() );
     }
 
-    public void testGetFileList()
-        throws Exception
-    {
-        Exception thrown = null;
-
-        try
-        {
-            Wagon wagon = getWagon();
-            wagon.setReadTimeout( 1000 );
-
-            Repository testRepository = new Repository();
-            testRepository.setUrl( "http://localhost:" + getPort() );
-
-            wagon.connect( testRepository );
-
-            wagon.getFileList( "/timeoutfile" );
-
-            wagon.disconnect();
-        }
-        catch ( Exception e )
-        {
-            thrown = e;
-        }
-        finally
-        {
-            stopServer();
-        }
-
-        assertNotNull( thrown );
-        assertEquals( TransferFailedException.class, thrown.getClass() );
-    }
-
     public void testPutTimeout()
         throws Exception
     {
@@ -197,7 +165,7 @@ public void testConnectionTimeout()
             wagon.connect( testRepository );
 
             long start = System.currentTimeMillis();
-            wagon.getFileList( "/foobar" );
+            wagon.resourceExists( "/foobar" );
             long end = System.currentTimeMillis();
 
             wagon.disconnect();
diff --git a/wagon-providers/wagon-scm/pom.xml b/wagon-providers/wagon-scm/pom.xml
index 8bfe72e..dfb7785 100644
--- a/wagon-providers/wagon-scm/pom.xml
+++ b/wagon-providers/wagon-scm/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon-providers</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
diff --git a/wagon-providers/wagon-ssh-common-test/pom.xml b/wagon-providers/wagon-ssh-common-test/pom.xml
index fce7f69..1ec09a9 100644
--- a/wagon-providers/wagon-ssh-common-test/pom.xml
+++ b/wagon-providers/wagon-ssh-common-test/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon-providers</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
diff --git a/wagon-providers/wagon-ssh-common/pom.xml b/wagon-providers/wagon-ssh-common/pom.xml
index 3abe160..d21adf2 100644
--- a/wagon-providers/wagon-ssh-common/pom.xml
+++ b/wagon-providers/wagon-ssh-common/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon-providers</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
diff --git a/wagon-providers/wagon-ssh-external/pom.xml b/wagon-providers/wagon-ssh-external/pom.xml
index bb280f7..3da7bfd 100644
--- a/wagon-providers/wagon-ssh-external/pom.xml
+++ b/wagon-providers/wagon-ssh-external/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon-providers</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
diff --git a/wagon-providers/wagon-ssh/pom.xml b/wagon-providers/wagon-ssh/pom.xml
index f9d767f..111bbb4 100644
--- a/wagon-providers/wagon-ssh/pom.xml
+++ b/wagon-providers/wagon-ssh/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon-providers</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
diff --git a/wagon-providers/wagon-ssh/src/site/apt/index.apt b/wagon-providers/wagon-ssh/src/site/apt/index.apt
index c74977a..99dcc2a 100644
--- a/wagon-providers/wagon-ssh/src/site/apt/index.apt
+++ b/wagon-providers/wagon-ssh/src/site/apt/index.apt
@@ -26,6 +26,10 @@
  ~~ NOTE: For help with the syntax of this file, see:
  ~~ http://maven.apache.org/doxia/references/apt-format.html
 
+Deprecation Notice
+
+  This Wagon provider is deprecated and will be removed in version 4.0.0.
+
 Maven Wagon SSH
 
  This component is an implementation of Wagon provider for SCP and SFTP access.
diff --git a/wagon-providers/wagon-webdav-jackrabbit/pom.xml b/wagon-providers/wagon-webdav-jackrabbit/pom.xml
index 2158a90..4944d90 100644
--- a/wagon-providers/wagon-webdav-jackrabbit/pom.xml
+++ b/wagon-providers/wagon-webdav-jackrabbit/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon-providers</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
diff --git a/wagon-providers/wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java b/wagon-providers/wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
index d991074..2aac440 100644
--- a/wagon-providers/wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
+++ b/wagon-providers/wagon-webdav-jackrabbit/src/main/java/org/apache/maven/wagon/providers/webdav/WebDavWagon.java
@@ -25,6 +25,7 @@
 import org.apache.http.auth.AuthScope;
 import org.apache.http.client.methods.CloseableHttpResponse;
 import org.apache.http.impl.auth.BasicScheme;
+import org.apache.http.util.EntityUtils;
 import org.apache.jackrabbit.webdav.DavConstants;
 import org.apache.jackrabbit.webdav.DavException;
 import org.apache.jackrabbit.webdav.MultiStatus;
@@ -52,6 +53,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import static org.apache.maven.wagon.shared.http.HttpMessageUtils.formatResourceDoesNotExistMessage;
+
 /**
  * <p>WebDavWagon</p>
  * <p/>
@@ -152,6 +155,10 @@ protected void mkdirs( String dir )
     private int doMkCol( String url )
         throws IOException
     {
+        // preemptive for mkcol
+        // TODO: is it a good idea, though? 'Expect-continue' handshake would serve much better
+
+        // FIXME Perform only when preemptive has been configured
         Repository repo = getRepository();
         HttpHost targetHost = new HttpHost( repo.getHost(), repo.getPort(), repo.getProtocol() );
         AuthScope targetScope = getBasicAuthScope().getScope( targetHost );
@@ -298,9 +305,13 @@ public List<String> getFileList( String destinationDirectory )
                     return dirs;
                 }
 
-                if ( closeableHttpResponse.getStatusLine().getStatusCode() == HttpStatus.SC_NOT_FOUND )
+                int statusCode = closeableHttpResponse.getStatusLine().getStatusCode();
+                String reasonPhrase = closeableHttpResponse.getStatusLine().getReasonPhrase();
+                if ( statusCode == HttpStatus.SC_NOT_FOUND || statusCode == HttpStatus.SC_GONE )
                 {
-                    throw new ResourceDoesNotExistException( "Destination directory does not exist: " + url );
+                    EntityUtils.consumeQuietly( closeableHttpResponse.getEntity() );
+                    throw new ResourceDoesNotExistException( formatResourceDoesNotExistMessage( url, statusCode,
+                            reasonPhrase, getProxyInfo() ) );
                 }
             }
         }
@@ -335,6 +346,7 @@ public List<String> getFileList( String destinationDirectory )
                 }
             }
         }
+        // FIXME WAGON-580; actually the exception is wrong here; we need an IllegalStateException here
         throw new ResourceDoesNotExistException(
             "Destination path exists but is not a " + "WebDAV collection (directory): " + url );
     }
diff --git a/wagon-providers/wagon-webdav-jackrabbit/src/site/apt/index.apt b/wagon-providers/wagon-webdav-jackrabbit/src/site/apt/index.apt
index be1ce58..2acc476 100644
--- a/wagon-providers/wagon-webdav-jackrabbit/src/site/apt/index.apt
+++ b/wagon-providers/wagon-webdav-jackrabbit/src/site/apt/index.apt
@@ -26,11 +26,16 @@
  ~~ NOTE: For help with the syntax of this file, see:
  ~~ http://maven.apache.org/doxia/references/apt-format.html
 
+Deprecation Notice
+
+  This Wagon provider is deprecated and will be removed in version 4.0.0. Its features will be
+  partially folded into the default HTTP provider.
+
 Maven Wagon WebDAV
 
  This component is an implementation of Wagon provider for WebDAV server access.
  You will need to use at least Java 1.6 if you want to use this Wagon provider.
- 
+
  It enables Maven to deploy artifacts and files to WebDAV enabled servers.
  Getting files from WebDAV servers is not fully tested.
 
diff --git a/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/HttpClientWagonTest.java b/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/HttpClientWagonTest.java
index 687db94..77016ea 100644
--- a/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/HttpClientWagonTest.java
+++ b/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/HttpClientWagonTest.java
@@ -93,7 +93,6 @@ public void testDefaultHeadersUsedByDefault()
 
         // these are the default headers.
         // method.addRequestHeader( "Cache-control", "no-cache" );
-        // method.addRequestHeader( "Cache-store", "no-store" );
         // method.addRequestHeader( "Pragma", "no-cache" );
         // "Accept-Encoding" is automatically set by HttpClient at runtime
 
@@ -101,10 +100,6 @@ public void testDefaultHeadersUsedByDefault()
         assertNotNull( header );
         assertEquals( "no-cache", header.getValue() );
 
-        header = method.getFirstHeader( "Cache-store" );
-        assertNotNull( header );
-        assertEquals( "no-store", header.getValue() );
-
         header = method.getFirstHeader( "Pragma" );
         assertNotNull( header );
         assertEquals( "no-cache", header.getValue() );
@@ -123,15 +118,11 @@ public void testTurnOffDefaultHeaders()
 
         // these are the default headers.
         // method.addRequestHeader( "Cache-control", "no-cache" );
-        // method.addRequestHeader( "Cache-store", "no-store" );
         // method.addRequestHeader( "Pragma", "no-cache" );
 
         Header header = method.getFirstHeader( "Cache-control" );
         assertNull( header );
 
-        header = method.getFirstHeader( "Cache-store" );
-        assertNull( header );
-
         header = method.getFirstHeader( "Pragma" );
         assertNull( header );
     }
diff --git a/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java b/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java
index 5c07d87..e6a355d 100644
--- a/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java
+++ b/wagon-providers/wagon-webdav-jackrabbit/src/test/java/org/apache/maven/wagon/providers/webdav/WebDavWagonTest.java
@@ -242,9 +242,15 @@ public void testMkdirsWithNoBasedir()
         }
     }
 
-    protected void setHttpHeaders( StreamingWagon wagon, Properties properties )
+    protected void setHttpConfiguration( StreamingWagon wagon, Properties headers, Properties params )
     {
-        ( (WebDavWagon) wagon ).setHttpHeaders( properties );
+        HttpConfiguration config = new HttpConfiguration();
+
+        HttpMethodConfiguration methodConfiguration = new HttpMethodConfiguration();
+        methodConfiguration.setHeaders( headers );
+        methodConfiguration.setParams( params );
+        config.setAll( methodConfiguration );
+        ( (WebDavWagon) wagon ).setHttpConfiguration( config );
     }
 
     /**
@@ -500,7 +506,7 @@ protected void checkRequestResponseForRedirectPutWithFullUrl( RedirectHandler re
         assertEquals( "found:" + putHandler.handlerRequestResponses, 1, putHandler.handlerRequestResponses.size() );
         assertEquals( "found:" + putHandler.handlerRequestResponses, HttpServletResponse.SC_CREATED,
                       putHandler.handlerRequestResponses.get( 0 ).responseCode );
-        assertEquals( "found:" + redirectHandler.handlerRequestResponses, 3,
+        assertEquals( "found:" + redirectHandler.handlerRequestResponses, 2,
                       redirectHandler.handlerRequestResponses.size() );
         assertEquals( "found:" + redirectHandler.handlerRequestResponses, HttpServletResponse.SC_SEE_OTHER,
                       redirectHandler.handlerRequestResponses.get( 0 ).responseCode );
@@ -512,7 +518,7 @@ protected void checkRequestResponseForRedirectPutWithRelativeUrl( RedirectHandle
     {
         assertEquals( "found:" + putHandler.handlerRequestResponses, 0, putHandler.handlerRequestResponses.size() );
 
-        assertEquals( "found:" + redirectHandler.handlerRequestResponses, 6,
+        assertEquals( "found:" + redirectHandler.handlerRequestResponses, 4,
                       redirectHandler.handlerRequestResponses.size() );
         assertEquals( "found:" + redirectHandler.handlerRequestResponses, HttpServletResponse.SC_SEE_OTHER,
                       redirectHandler.handlerRequestResponses.get( 0 ).responseCode );
diff --git a/wagon-tcks/pom.xml b/wagon-tcks/pom.xml
index 247abe1..6e31826 100644
--- a/wagon-tcks/pom.xml
+++ b/wagon-tcks/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
diff --git a/wagon-tcks/wagon-tck-http/pom.xml b/wagon-tcks/wagon-tck-http/pom.xml
index 75cc428..6453d3a 100644
--- a/wagon-tcks/wagon-tck-http/pom.xml
+++ b/wagon-tcks/wagon-tck-http/pom.xml
@@ -23,7 +23,7 @@ under the License.
   <parent>
     <groupId>org.apache.maven.wagon</groupId>
     <artifactId>wagon-tcks</artifactId>
-    <version>3.3.4</version>
+    <version>3.5.1</version>
     <relativePath>../pom.xml</relativePath>
   </parent>
 
diff --git a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/Assertions.java b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/Assertions.java
index eb7cfa8..ca9dc66 100644
--- a/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/Assertions.java
+++ b/wagon-tcks/wagon-tck-http/src/main/java/org/apache/maven/wagon/tck/http/Assertions.java
@@ -40,7 +40,7 @@
 import static org.junit.Assert.assertTrue;
 
 /**
- * 
+ *
  */
 public final class Assertions
 {
@@ -119,7 +119,7 @@ public static void assertWagonExceptionMessage( Exception e, int forStatusCode,
                     assertTrue( "404 not found response should throw ResourceDoesNotExistException",
                             e instanceof ResourceDoesNotExistException );
                     reasonPhrase = StringUtils.isEmpty( forReasonPhrase ) ? " Not Found" : ( " " + forReasonPhrase );
-                    assertEquals( assertMessageForBadMessage, "Resource missing at " + forUrl + " 404"
+                    assertEquals( assertMessageForBadMessage, "resource missing at " + forUrl + ", status: 404"
                             + reasonPhrase, e.getMessage() );
                     break;
 
@@ -130,7 +130,7 @@ public static void assertWagonExceptionMessage( Exception e, int forStatusCode,
                                     + "methods",
                             e instanceof AuthorizationException );
                     reasonPhrase = StringUtils.isEmpty( forReasonPhrase ) ? " Unauthorized" : ( " " + forReasonPhrase );
-                    assertEquals( assertMessageForBadMessage, "Authentication failed for " + forUrl + " 401"
+                    assertEquals( assertMessageForBadMessage, "authentication failed for " + forUrl + ", status: 401"
                             + reasonPhrase, e.getMessage() );
                     break;
 
@@ -139,15 +139,15 @@ public static void assertWagonExceptionMessage( Exception e, int forStatusCode,
                             e instanceof AuthorizationException );
                     reasonPhrase = StringUtils.isEmpty( forReasonPhrase ) ? " Proxy Authentication Required"
                             : ( " " + forReasonPhrase );
-                    assertEquals( assertMessageForBadMessage, "HTTP proxy server authentication failed for "
-                            + forUrl + " 407" + reasonPhrase, e.getMessage() );
+                    assertEquals( assertMessageForBadMessage, "proxy authentication failed for "
+                            + forUrl + ", status: 407" + reasonPhrase, e.getMessage() );
                     break;
 
                 case HttpServletResponse.SC_FORBIDDEN:
                     assertTrue( "403 Forbidden should throw AuthorizationException",
                             e instanceof AuthorizationException );
                     reasonPhrase = StringUtils.isEmpty( forReasonPhrase ) ? " Forbidden" : ( " " + forReasonPhrase );
-                    assertEquals( assertMessageForBadMessage, "Authorization failed for " + forUrl + " 403"
+                    assertEquals( assertMessageForBadMessage, "authorization failed for " + forUrl + ", status: 403"
                             + reasonPhrase, e.getMessage() );
                     break;
 
@@ -158,29 +158,29 @@ public static void assertWagonExceptionMessage( Exception e, int forStatusCode,
                     // the status code and reason phrase cannot always be learned due to implementation limitations
                     // so the message may not include them, but the implementation should use a consistent format
                     assertTrue( "message should always include url tried: " + e.getMessage(),
-                            e.getMessage().startsWith( "Transfer failed for " + forUrl ) );
+                            e.getMessage().startsWith( "transfer failed for " + forUrl ) );
 
                     String statusCodeStr = forStatusCode == NO_RESPONSE_STATUS_CODE ? ""
-                            : String.valueOf( forStatusCode );
+                            : ", status: " +  forStatusCode;
                     if ( forStatusCode != NO_RESPONSE_STATUS_CODE )
                     {
 
                         assertTrue( "if there was a response status line, the status code should be >= 400",
                                 forStatusCode >= HttpServletResponse.SC_BAD_REQUEST );
 
-                        if ( e.getMessage().length() > ( "Transfer failed for " + forUrl ).length() )
+                        if ( e.getMessage().length() > ( "transfer failed for " + forUrl ).length() )
                         {
                             assertTrue( "message should include url and status code: " + e.getMessage(),
-                                    e.getMessage().startsWith( "Transfer failed for " + forUrl + statusCodeStr ) );
+                                    e.getMessage().startsWith( "transfer failed for " + forUrl + statusCodeStr ) );
                         }
 
                         reasonPhrase = forReasonPhrase == null ? "" : " " + forReasonPhrase;
 
-                        if ( reasonPhrase.length() > 0 && e.getMessage().length() > ( "Transfer failed for " + forUrl
+                        if ( reasonPhrase.length() > 0 && e.getMessage().length() > ( "transfer failed for " + forUrl
                                 + statusCodeStr ).length() )
                         {
                             assertTrue( "message should include url and status code and reason phrase: "
-                                    + e.getMessage(), e.getMessage().startsWith( "Transfer failed for "
+                                    + e.getMessage(), e.getMessage().startsWith( "transfer failed for "
                                             + forUrl + statusCodeStr
                                             + reasonPhrase ) );
                         }