* Adding isDav check to MKCOL creation path.

git-svn-id: https://svn.apache.org/repos/asf/maven/wagon/branches/wagon-http-with-webdav@631501 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java b/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
index 7888e11..e119d6a 100644
--- a/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
+++ b/src/main/java/org/apache/maven/wagon/providers/http/HttpWagon.java
@@ -174,7 +174,7 @@
         }
 
         // Problem. Check that the collections exist.
-        if ( statusCode == HttpStatus.SC_CONFLICT )
+        if ( ( isDav ) && ( statusCode == HttpStatus.SC_CONFLICT ) )
         {
             URI absoluteURI = toURI( url );
             URI parentURI = absoluteURI.resolve( "./" ).normalize();
@@ -199,6 +199,9 @@
                 return;
             }
         }
+
+        throw new TransferFailedException( "Unable to upload (" + statusCode + "/"
+            + HttpStatus.getStatusText( statusCode ) + ") file " + source.getAbsolutePath() + " to " + url );
     }
 
     /**