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

Does not follow HTTP 307 "Temporary Redirects"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Incomplete
    • Affects Version/s: 2.9
    • Fix Version/s: None
    • Component/s: wagon-http
    • Labels:
    • Environment:
      Linux x86_64 ( Ubuntu 14.04.2 LTS )

      Description

      Using maven-3.3.3 (latest version), which I believe may use Maven Wagon 2.9
      (not sure) , I cannot download a JAR from our corporate Nexus instance
      for which a HTTP 307 ( "Temporary Redirect" ) response header is issued -
      the curl command given emits this trace log (names redacted) :

      $ curl 'http://mavenrepo.$MY_CORP.net:8081/nexus/service/local/artifact/maven/redirect?r=$REPO&g=$GROUPID&a=${ARTIFACT}&v=${VERSION}&e=jar' --trace-ascii /dev/fd/2 >/dev/null          
      == Info: Hostname was NOT found in DNS cache
      == Info:   Trying ${IP_OCT3}.${IP_OCT2}.${IP_OCT1}.${IP_OCT0} ...
      == Info: Connected to ${NAME}.${MY_CORP}.net (${IP_OCT3}.${IP_OCT2}.${IP_OCT1}.${IP_OCT0}) port 8081 (#0)
      => Send header, 207 bytes (0xcf)
      0000: GET /nexus/service/local/artifact/maven/redirect?r=${REPO}&
      0040: g=${GROUPID}&a=${ARTIFACT}&v=${VERSION}&e=jar HTTP/1.1
      0081: User-Agent: curl/7.35.0
      009a: Host: ${NAME}.${MY_CORP}.net:8081
      00c0: Accept: */*
      00cd: 
      <= Recv header, 33 bytes (0x21)
      0000: HTTP/1.1 307 Temporary Redirect
      <= Recv header, 37 bytes (0x25)
      0000: Date: Fri, 22 May 2015 19:06:44 GMT
      == Info: Server Nexus/2.11.1-01 is not blacklisted
      <= Recv header, 25 bytes (0x19)
      0000: Server: Nexus/2.11.1-01
      <= Recv header, 29 bytes (0x1d)
      0000: X-Frame-Options: SAMEORIGIN
      <= Recv header, 33 bytes (0x21)
      0000: X-Content-Type-Options: nosniff
      <= Recv header, 96 bytes (0x60)
      0000: Set-Cookie: rememberMe=deleteMe; Path=/nexus; Max-Age=0; Expires
      0040: =Thu, 21-May-2015 19:06:44 GMT
      <= Recv header, 51 bytes (0x33)
      0000: Content-Type: application/xml; charset=ISO-8859-1
      <= Recv header, 37 bytes (0x25)
      0000: Date: Fri, 22 May 2015 19:06:44 GMT
      <= Recv header, 169 bytes (0xa9)
      0000: Location: http://mavenrepo.synchronoss.net:8081/nexus/service/lo
      0040: cal/repositories/ ...
      ${LONG_REPOSITORY_PATH}/${ARTIFACTID}-${VERSION}.jar
      <= Recv header, 64 bytes (0x40)
      0000: Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
      == Info: Server Noelios-Restlet-Engine/1.1.6-SONATYPE-5348-V8 is not blacklisted
      <= Recv header, 55 bytes (0x37)
      0000: Server: Noelios-Restlet-Engine/1.1.6-SONATYPE-5348-V8
      <= Recv header, 21 bytes (0x15)
      0000: Content-Length: 211
      <= Recv header, 2 bytes (0x2)
      0000: 
      <= Recv data, 211 bytes (0xd3)
      0000: If you are not automatically redirected use this url: http://${NAME}.${MY_CORP}/... ${ANOTHER_LONG_REPOSITORY_PATH}${GROUPID}/${ARTIFACTID}/${VERSION}/${ARTIFACTID}-${VERSION}.jar
      100   211  100   211    0     0    976      0 --:--:-- --:--:-- --:--:--   981
      == Info: Connection #0 to host ${NAME}.${MY_CORP}.net left intact
      

      And what is output on curl's standard output is what is shown on its
      standard error, ie. the HTML error page - this would end up being
      the jar file contents.

      Is there something I'm not getting about how to enable HTTP redirect support in maven (sorry, I am a bit of a maven newbie) or is this a bug ?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              JVD66 Jason Vas Dias
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: