You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/12/18 18:31:35 UTC

svn commit: r1552043 - in /subversion/trunk/subversion: libsvn_ra_serf/util.c tests/cmdline/authz_tests.py

Author: rhuijben
Date: Wed Dec 18 17:31:35 2013
New Revision: 1552043

URL: http://svn.apache.org/r1552043
Log:
In ra serf: Handle all http errors except 404 as failures, instead of just a
few specific ones. This avoids running the xml parser on raw http errors,
which just causes hard to understand errors.

The exception for 404 is currently the only case that code expects to get
through as non error in a few places.

* subversion/libsvn_ra_serf/util.c
  (handle_response): Handle all http errors except code 404 as error.

* subversion/tests/cmdline/authz_tests.py
  (log_diff_dontdothat): Remove XFail and expect a cleaner error.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/util.c
    subversion/trunk/subversion/tests/cmdline/authz_tests.py

Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1552043&r1=1552042&r2=1552043&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Wed Dec 18 17:31:35 2013
@@ -2119,10 +2119,8 @@ handle_response(serf_request_t *request,
     }
   handler->conn->last_status_code = handler->sline.code;
 
-  if (handler->sline.code == 405
-      || handler->sline.code == 408
-      || handler->sline.code == 409
-      || handler->sline.code >= 500)
+  if (handler->sline.code >= 400
+      && handler->sline.code != 404)
     {
       /* 405 Method Not allowed.
          408 Request Timeout

Modified: subversion/trunk/subversion/tests/cmdline/authz_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/authz_tests.py?rev=1552043&r1=1552042&r2=1552043&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/authz_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/authz_tests.py Wed Dec 18 17:31:35 2013
@@ -1532,7 +1532,6 @@ def authz_del_from_subdir(sbox):
                                       '-m', '')
 
 
-@XFail()
 @SkipUnless(svntest.main.is_ra_type_dav) # dontdothat is dav only
 @SkipUnless(svntest.main.is_os_windows) # until the buildbots are configured
 def log_diff_dontdothat(sbox):
@@ -1547,7 +1546,8 @@ def log_diff_dontdothat(sbox):
 
   # We should expect a PASS or a proper error message instead of
   # svn: E175009: XML parsing failed: (403 Forbidden)
-  svntest.actions.run_and_verify_svn(None, None, [],
+  expected_err = ".*E175013: Access to '.*authz_tests-28.*' forbidden"
+  svntest.actions.run_and_verify_svn(None, None, expected_err,
                                       'log', ddt_url,
                                       '-c', 1, '--diff')