subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Martin <philip.mar...@wandisco.com>
Subject Re: serf error handling for locks without authn
Date Wed, 05 Jun 2013 08:27:27 GMT
Philip Martin <philip.martin@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

Mime
View raw message