Uploaded image for project: 'Maven Wagon'
  1. Maven Wagon
  2. WAGON-95

Upload fail with exception "Entity closing requests cannot be redirected..."

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 1.0-beta-3
    • None
    • wagon-webdav
    • None
    • Mac OS X, server: Archiva 1.0, wagon webdav: latest suversion version (1.0-rc1-snapshot)
    • Patch

    Description

      When i try to upload a file with te webdav wagon to archiva it fail with the following exception:
      [INFO] Retrieving previous build number from ubik-central
      Uploading: http://forge.ubik-products.com/archiva/repository/ubik-central//com/ubikproducts/xsystem/xsystem/1.0-SNAPSHOT/xsystem-1.0-20071230.114939-2.pom
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Entity enclosing requests cannot be redirected without user intervention
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.IllegalArgumentException: Entity enclosing requests cannot be redirected without user intervention
      at org.apache.commons.httpclient.methods.EntityEnclosingMethod.setFollowRedirects(EntityEnclosingMethod.java:225)
      at org.apache.maven.wagon.providers.webdav.CorrectedWebdavResource.putMethod(CorrectedWebdavResource.java:150)
      at org.apache.maven.wagon.providers.webdav.WebDavWagon.put(WebDavWagon.java:242)
      at org.apache.maven.artifact.manager.DefaultWagonManager.putRemoteFile(DefaultWagonManager.java:237)
      at org.apache.maven.artifact.manager.DefaultWagonManager.putArtifact(DefaultWagonManager.java:153)

      I have to put the followRedirect parameter to false for the file to be uploaed correctly:
      method.setFollowRedirects( super.followRedirects );
      to
      //is it possible to follow redirects on PUT operations ?
      method.setFollowRedirects( false );

      But i' wondering why such error happen in the first place, i guess others should have encountered it before.

      Attachments

        Issue Links

          Activity

            People

              brett Brett Porter
              lmaitre Ludovic Maître
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: