Return-Path: X-Original-To: apmail-subversion-commits-archive@minotaur.apache.org Delivered-To: apmail-subversion-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 61DF510AD7 for ; Wed, 18 Dec 2013 17:32:06 +0000 (UTC) Received: (qmail 95301 invoked by uid 500); 18 Dec 2013 17:32:03 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 94640 invoked by uid 500); 18 Dec 2013 17:32:00 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 94628 invoked by uid 99); 18 Dec 2013 17:31:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Dec 2013 17:31:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Dec 2013 17:31:56 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id AD5342388993; Wed, 18 Dec 2013 17:31:35 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1552043 - in /subversion/trunk/subversion: libsvn_ra_serf/util.c tests/cmdline/authz_tests.py Date: Wed, 18 Dec 2013 17:31:35 -0000 To: commits@subversion.apache.org From: rhuijben@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20131218173135.AD5342388993@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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')