Author: svn-role
Date: Fri Aug 16 04:00:43 2013
New Revision: 1514572

URL: http://svn.apache.org/r1514572
Log:
Merge r1490684 from trunk:

 * r1490684
   Return 500 rather than 409 when commit fails and it is not a conflict.
   Justification:
     Not a client failure so 4xx is wrong.
   Votes:
     +1: philip, brane, breser

Modified:
    subversion/branches/1.7.x/   (props changed)
    subversion/branches/1.7.x/STATUS
    subversion/branches/1.7.x/subversion/mod_dav_svn/version.c

Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1490684

Modified: subversion/branches/1.7.x/STATUS
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1514572&r1=1514571&r2=1514572&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Fri Aug 16 04:00:43 2013
@@ -205,10 +205,3 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1490684
-   Return 500 rather than 409 when commit fails and it is not a conflict.
-   Justification:
-     Not a client failure so 4xx is wrong.
-   Votes:
-     +1: philip, brane, breser
-

Modified: subversion/branches/1.7.x/subversion/mod_dav_svn/version.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/mod_dav_svn/version.c?rev=1514572&r1=1514571&r2=1514572&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/1.7.x/subversion/mod_dav_svn/version.c Fri Aug 16 
04:00:43 2013
@@ -953,8 +953,11 @@ dav_svn__checkin(dav_resource *resource,
 
           if (serr)
             {
+              int status;
+
               if (serr->apr_err == SVN_ERR_FS_CONFLICT)
                 {
+                  status = HTTP_CONFLICT;
                   msg = apr_psprintf(resource->pool,
                                      "A conflict occurred during the CHECKIN "
                                      "processing. The problem occurred with  "
@@ -962,10 +965,12 @@ dav_svn__checkin(dav_resource *resource,
                                      conflict_msg);
                 }
               else
-                msg = "An error occurred while committing the transaction.";
+                {
+                  status = HTTP_INTERNAL_SERVER_ERROR;
+                  msg = "An error occurred while committing the transaction.";
+                }
 
-              return dav_svn__convert_err(serr, HTTP_CONFLICT, msg,
-                                          resource->pool);
+              return dav_svn__convert_err(serr, status, msg, resource->pool);
             }
           else
             {
@@ -1455,8 +1460,11 @@ merge(dav_resource *target,
       if (serr)
         {
           const char *msg;
+          int status;
+
           if (serr->apr_err == SVN_ERR_FS_CONFLICT)
             {
+              status = HTTP_CONFLICT;
               /* ### we need to convert the conflict path into a URI */
               msg = apr_psprintf(pool,
                                  "A conflict occurred during the MERGE "
@@ -1465,9 +1473,12 @@ merge(dav_resource *target,
                                  conflict);
             }
           else
-            msg = "An error occurred while committing the transaction.";
+            {
+              status = HTTP_INTERNAL_SERVER_ERROR;
+              msg = "An error occurred while committing the transaction.";
+            }
 
-          return dav_svn__convert_err(serr, HTTP_CONFLICT, msg, pool);
+          return dav_svn__convert_err(serr, status, msg, pool);
         }
       else
         {


Reply via email to