You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <d....@daniel.shahaf.name> on 2012/10/30 04:07:17 UTC

Re: svn commit: r1403583 - /subversion/trunk/subversion/libsvn_ra_serf/util.c

cmpilato@apache.org wrote on Mon, Oct 29, 2012 at 23:53:21 -0000:
> Author: cmpilato
> Date: Mon Oct 29 23:53:20 2012
> New Revision: 1403583
> 
> URL: http://svn.apache.org/viewvc?rev=1403583&view=rev
> Log:
> Fix the cause of a client-side hang in ra_serf's handling of
> Subversion's custom XML error tags.
> 

+1 to backport, if you intend to nominate it



> * subversion/libsvn_ra_serf/util.c
>   (start_error): Treat an error tag which has errcode="0" the same as
>     one that lacks an error code altogether.
> 
> Modified:
>     subversion/trunk/subversion/libsvn_ra_serf/util.c
> 
> Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1403583&r1=1403582&r2=1403583&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_serf/util.c Mon Oct 29 23:53:20 2012
> @@ -836,7 +836,12 @@ start_error(svn_ra_serf__xml_parser_t *p
>            SVN_ERR(svn_cstring_atoi64(&val, err_code));
>            ctx->error->apr_err = (apr_status_t)val;
>          }
> -      else
> +
> +      /* If there's no error code provided, or if the provided code is
> +         0 (which can happen sometimes depending on how the error is
> +         constructed on the server-side), just pick a generic error
> +         code to run with. */
> +      if (! ctx->error->apr_err)
>          {
>            ctx->error->apr_err = SVN_ERR_RA_DAV_REQUEST_FAILED;
>          }
> 
>