[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: serf error handling for locks without authn

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Wed, 05 Jun 2013 09:27:27 +0100

Philip Martin <philip.martin_at_wandisco.com> writes:

> I'm trying to work out what this code should look like. This function
> is called after LOCK and PROPFIND, but not UNLOCK which has its own
> code. I think the function should be something like:
>
> apr_status_t errcode;
>
> if (err)
> return err;
>
> if (handler->sline.code == 200 || handler->sline.code == 207)
> return SVN_NO_ERROR;
> else if (handler->sline.code == 423)
> errcode = SVN_ERR_FS_PATH_ALREADY_LOCKED;
> else if (handler->sline.code == 403)
> errcode = SVN_ERR_RA_DAV_FORBIDDEN;
> else
> errcode = SVN_ERR_RA_DAV_REQUEST_FAILED;
>
> return svn_error_createf(errcode, NULL,
> _("Lock request failed: %d %s"),
> handler->sline.code,
> handler->sline.reason ? handler->sline.reason : "");
>
>
> where a non-NULL err is given precedence otherwise the status line is
> examined. 200 is not an error and the regression tests require 207 to
> be treated as success as well.
>
> I'm not confident about changing this code but I think we have to do
> something for 1.8 as the current code simply drops status line errors if
> err is NULL.

I committed this to trunk. I've triggered the bug with a modified
server but I can't see how to get an unmodified server to do it. So I
see no immediate need to backport the change to 1.8.x.

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download
Received on 2013-06-05 10:28:07 CEST

This is an archived mail posted to the Subversion Dev mailing list.