brett       2004/11/04 03:08:57

  Modified:    src/java/org/apache/maven/util Tag: MAVEN-1_0-BRANCH
                        HttpUtils.java
               xdocs    Tag: MAVEN-1_0-BRANCH changes.xml
  Log:
  PR: MAVEN-1405

  Submitted by: Philip Kohl

  Reviewed by:  Brett Porter

  use preemptive authentication when there are some credentials
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.28.4.17 +4 -4      maven/src/java/org/apache/maven/util/HttpUtils.java
  
  Index: HttpUtils.java
  ===================================================================
  RCS file: /home/cvs/maven/src/java/org/apache/maven/util/HttpUtils.java,v
  retrieving revision 1.28.4.16
  retrieving revision 1.28.4.17
  diff -u -r1.28.4.16 -r1.28.4.17
  --- HttpUtils.java    4 Nov 2004 10:56:19 -0000       1.28.4.16
  +++ HttpUtils.java    4 Nov 2004 11:08:56 -0000       1.28.4.17
  @@ -241,7 +241,7 @@
       }
   
       /**
  -     * Retrieve a remote file.  Throws an Exception on errors unless the 
  +     * Retrieve a remote file.  Throws an Exception on errors unless the
        * ifnoreErrors flag is set to True
        *
        * @param url the of the file to retrieve
  @@ -256,7 +256,7 @@
        *        or null
        * @param proxyPassword Proxy Password (if authentification is required),
        *        or null
  -     * @param loginHost The host the authentication request is originating from. 
  +     * @param loginHost The host the authentication request is originating from.
        *        Essentially, the computer name for this machine.
        * @param loginDomain the domain to authenticate within.
        * @param downloadMeter the download meter to use
  @@ -370,6 +370,7 @@
               client.setHostConfiguration(hc);
               if (creds != null) {
                   client.getState().setProxyCredentials(null, null, creds);
  +                client.getState().setAuthenticationPreemptive( true );
               }
   
               // Basic authentication
  @@ -377,6 +378,7 @@
               {
                   creds = new UsernamePasswordCredentials(username, password);
                   client.getState().setCredentials(null, null, creds);
  +                client.getState().setAuthenticationPreemptive( true );
               }
   
               for (int i = 0; i < REDIRECT_LIMIT; i++ )
  @@ -646,8 +648,6 @@
        * @param timemillis in milliseconds since the start of the era
        * @return true if it succeeded. False means that this is a java1.1 system
        *      and that file times can not be set
  -     * @exception Exception Thrown in unrecoverable error. Likely this
  -     *      comes from file access failures.
        */
       private static boolean touchFile( File file, long timemillis )
       {
  
  
  
  No                   revision
  No                   revision
  1.14.4.46 +2 -0      maven/xdocs/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/maven/xdocs/changes.xml,v
  retrieving revision 1.14.4.45
  retrieving revision 1.14.4.46
  diff -u -r1.14.4.45 -r1.14.4.46
  --- changes.xml       30 Oct 2004 11:30:28 -0000      1.14.4.45
  +++ changes.xml       4 Nov 2004 11:08:56 -0000       1.14.4.46
  @@ -25,6 +25,8 @@
     </properties>
     <body>
       <release version="1.0.1-SNAPSHOT" date="in CVS MAVEN-1_0-BRANCH">
  +      <action dev="brett" type="fix" issue="MAVEN-1405" due-to="Philipp Kohl">Use 
preemptive authentication when there are some credentials, so the first 403 is really 
forbidden.</action>
  +      <action dev="brett" type="fix" issue="MAVEN-1457">Don't display the password 
on the console when a remote repository uses basic authentication.</action>
         <action dev="brett" type="fix" issue="MAVEN-1471">Prevent 
NullPointerException in a case that has been encountered, and display a warning 
instead.</action>
         <action dev="brett" type="fix" issue="MAVEN-1469">Give an error message if 
the parent pom is not valid</action>
         <action dev="brett" type="fix" issue="MAVEN-1439" due-to="Shinobu 
Kawai">Allow the property <code>maven.mode.online</code> to work, but be overridden by 
the <code>-o</code> command line option</action>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to