maven-wagon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From joak...@apache.org
Subject svn commit: r485099 - /maven/wagon/trunk/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
Date Sun, 10 Dec 2006 00:20:10 GMT
Author: joakime
Date: Sat Dec  9 16:20:09 2006
New Revision: 485099

URL: http://svn.apache.org/viewvc?view=rev&rev=485099
Log:
[WAGONHTTP-7] HTTP Response Code 204 (No Content) not treated as success.
Ensuring that success codes match between the two http providers.

Modified:
    maven/wagon/trunk/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java

Modified: maven/wagon/trunk/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
URL: http://svn.apache.org/viewvc/maven/wagon/trunk/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java?view=diff&rev=485099&r1=485098&r2=485099
==============================================================================
--- maven/wagon/trunk/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
(original)
+++ maven/wagon/trunk/wagon-providers/wagon-http/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
Sat Dec  9 16:20:09 2006
@@ -16,17 +16,6 @@
  * limitations under the License.
  */
 
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-import java.util.List;
-import java.util.Locale;
-import java.util.TimeZone;
-import java.util.zip.GZIPInputStream;
-
 import org.apache.commons.httpclient.Credentials;
 import org.apache.commons.httpclient.Header;
 import org.apache.commons.httpclient.HostConfiguration;
@@ -51,6 +40,17 @@
 import org.codehaus.plexus.util.IOUtil;
 import org.codehaus.plexus.util.StringUtils;
 
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Locale;
+import java.util.TimeZone;
+import java.util.zip.GZIPInputStream;
+
 /**
  * @author <a href="michal.maczka@dimatics.com">Michal Maczka</a>
  * @version $Id$
@@ -192,10 +192,11 @@
         // Check that we didn't run out of retries.
         switch ( statusCode )
         {
-            case HttpStatus.SC_OK:
-                break;
-
-            case HttpStatus.SC_CREATED:
+            // Success Codes
+            case HttpStatus.SC_OK: // 200
+            case HttpStatus.SC_CREATED: // 201
+            case HttpStatus.SC_ACCEPTED: // 202
+            case HttpStatus.SC_NO_CONTENT:  // 204
                 break;
 
             case SC_NULL:



---------------------------------------------------------------------
To unsubscribe, e-mail: wagon-commits-unsubscribe@maven.apache.org
For additional commands, e-mail: wagon-commits-help@maven.apache.org


Mime
View raw message