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 B3218EE3B for ; Wed, 6 Mar 2013 19:19:12 +0000 (UTC) Received: (qmail 80277 invoked by uid 500); 6 Mar 2013 19:19:12 -0000 Delivered-To: apmail-subversion-commits-archive@subversion.apache.org Received: (qmail 80237 invoked by uid 500); 6 Mar 2013 19:19:12 -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 80230 invoked by uid 99); 6 Mar 2013 19:19:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Mar 2013 19:19:12 +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, 06 Mar 2013 19:19:11 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 5C19E2388847; Wed, 6 Mar 2013 19:18:52 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1453491 - /subversion/branches/1.7.x-issue4332/subversion/libsvn_ra_neon/props.c Date: Wed, 06 Mar 2013 19:18:52 -0000 To: commits@subversion.apache.org From: cmpilato@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130306191852.5C19E2388847@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cmpilato Date: Wed Mar 6 19:18:51 2013 New Revision: 1453491 URL: http://svn.apache.org/r1453491 Log: On the '1.7.x-issue4332' branch: Fix issue #4332 ("neon OPTIONS request on repository root causes authz access denied"). * subversion/libsvn_ra_neon/props.c (svn_ra_neon__do_check_path): When checking a patch against an invalid revision number (that is, HEAD), query its public URL rather than trying to resolve HEAD into a fixed revision number and then querying the baseline URL for the path in that revision. Modified: subversion/branches/1.7.x-issue4332/subversion/libsvn_ra_neon/props.c Modified: subversion/branches/1.7.x-issue4332/subversion/libsvn_ra_neon/props.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue4332/subversion/libsvn_ra_neon/props.c?rev=1453491&r1=1453490&r2=1453491&view=diff ============================================================================== --- subversion/branches/1.7.x-issue4332/subversion/libsvn_ra_neon/props.c (original) +++ subversion/branches/1.7.x-issue4332/subversion/libsvn_ra_neon/props.c Wed Mar 6 19:18:51 2013 @@ -1313,9 +1313,7 @@ svn_ra_neon__do_check_path(svn_ra_sessio { svn_ra_neon__session_t *ras = session->priv; const char *url = ras->url->data; - const char *bc_url; - const char *bc_relative; - svn_error_t *err; + svn_error_t *err = SVN_NO_ERROR; svn_boolean_t is_dir; /* ### For now, using svn_ra_neon__get_starting_props() works because @@ -1350,18 +1348,25 @@ svn_ra_neon__do_check_path(svn_ra_sessio if (path) url = svn_path_url_add_component2(url, path, pool); - err = svn_ra_neon__get_baseline_info(&bc_url, &bc_relative, NULL, ras, - url, revision, pool); + /* If we're querying HEAD, we can do so against the public URL; + otherwise, we have to get a revision-specific URL to work with. */ + if (SVN_IS_VALID_REVNUM(revision)) + { + const char *bc_url; + const char *bc_relative; + + err = svn_ra_neon__get_baseline_info(&bc_url, &bc_relative, NULL, ras, + url, revision, pool); + if (! err) + url = svn_path_url_add_component2(bc_url, bc_relative, pool); + } if (! err) { svn_ra_neon__resource_t *rsrc; - const char *full_bc_url = svn_path_url_add_component2(bc_url, - bc_relative, - pool); - - /* query the DAV:resourcetype of the full, assembled URL. */ - err = svn_ra_neon__get_starting_props(&rsrc, ras, full_bc_url, pool); + + /* Query the DAV:resourcetype. */ + err = svn_ra_neon__get_starting_props(&rsrc, ras, url, pool); if (! err) is_dir = rsrc->is_collection; }