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

Do not wait for 401 "authentication needed" response to send the login/pwd on PUT queries

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-6
    • 2.0
    • wagon-http-lightweight
    • None

    Description

      When the maven repository requires authentication to PUT jars,
      1- the deploy plugin first triggers a HTTP PUT query without login/pwd, trying to send the jar
      2- then the repo rejects this query as 401 "need authentication" error
      3- then the deploy plugin triggers again same HTTP PUT query with the login/pwd and sends the jar again
      4- then the repo accepts this second query and uploads the jar

      This sequence consumes useless I/O (trying to send the jar on first query)
      and causes issues on some configurations like HTTPS with a frontend webserver : randomly the HTTPS connection is cut (Nginx HTTPS forwarding to Nexus HTTPS).

      It will be better (by default or with some config var) to provide immediately the login/pwd on PUT queries
      => aka: sending the HTTP header "Authentication: BASIC xxxxx"

      Tested with Maven 2.2.1, Deploy 2.5, Nexus 1.7.2, Nginx

      Attachments

        Activity

          People

            olamy Olivier Lamy
            erwan.ducroquet Erwan Ducroquet
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: