evenisse 2004/02/06 01:55:28 Modified: src/java/org/apache/maven/util Tag: MAVEN-1_0-BRANCH HttpUtils.java Log: MAVEN-1151. Improved reporting of proxy authentication failure. Revision Changes Path No revision No revision 1.28.4.2 +13 -0 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.1 retrieving revision 1.28.4.2 diff -u -r1.28.4.1 -r1.28.4.2 --- HttpUtils.java 3 Jan 2004 06:29:55 -0000 1.28.4.1 +++ HttpUtils.java 6 Feb 2004 09:55:27 -0000 1.28.4.2 @@ -268,7 +268,9 @@ if ( httpConnection.getResponseCode() == HttpURLConnection.HTTP_NOT_FOUND) { if (ignoreErrors) + { return; + } throw new FileNotFoundException(url.toString() + " (HTTP Error: " + httpConnection.getResponseCode() + " " + httpConnection.getResponseMessage() + ")"); } @@ -280,8 +282,19 @@ if ( httpConnection.getResponseCode() == HttpURLConnection.HTTP_UNAUTHORIZED ) { if (ignoreErrors) + { return; + } throw new Exception( "Not authorized." ); + } + // test for 407 result (HTTP only) + if ( httpConnection.getResponseCode() == HttpURLConnection.HTTP_PROXY_AUTH ) + { + if (ignoreErrors) + { + return; + } + throw new Exception( "Not authorized by proxy." ); } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]