This time with patch.
Lieven Govaerts wrote:
> I have some problems to get the authz_tests working on my (Windows)
> laptop with ra_serf. What happens is that svn will abort on all tests
> the involve a '403 Forbidden' response from apache.
> Am I the only one with this problem?
>
> Attached patch will make ra_serf raise an error upon receiving a reponse
> with code 403. It only does a minimum of cleanup before returning the
> error. I think that's ok, but would appreciate a second opinion.
>
> Lieven
>
> [[[
> Fix abort()'s when trying to access a forbidden resource. This also catches
> the 'broken authz file' situation.
>
> * subversion/libsvn_ra_serf/util.c
> (handle_response): catch response code 403 and raise an error.
> ]]]
>
>
>
Index: subversion/libsvn_ra_serf/util.c
===================================================================
--- subversion/libsvn_ra_serf/util.c (revision 25533)
+++ subversion/libsvn_ra_serf/util.c (working copy)
@@ -963,6 +963,16 @@
status = svn_ra_serf__handle_discard_body(request, response, NULL, pool);
}
}
+ else if (sl.code == 403)
+ {
+ svn_ra_serf__handle_discard_body(request, response, NULL, pool);
+ ctx->session->pending_error =
+ svn_error_createf(SVN_ERR_RA_NOT_AUTHORIZED, NULL,
+ "%s request failed on '%s'\n%d %s",
+ ctx->method, ctx->session->repos_url_str,
+ sl.code, sl.reason);
+ return ctx->session->pending_error->apr_err;
+ }
else if (sl.code >= 500)
{
ctx->session->pending_error =
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Jun 25 20:15:25 2007