You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2016/04/15 13:01:09 UTC
svn commit: r1739280 - /subversion/trunk/subversion/libsvn_ra_serf/commit.c
Author: ivan
Date: Fri Apr 15 11:01:08 2016
New Revision: 1739280
URL: http://svn.apache.org/viewvc?rev=1739280&view=rev
Log:
Follow-up to r1663500: Use NO_FAIL_ON_HTTP_FAILURE_STATUS flag in
svn_ra_serf__handler_t to handle HTTP request status codes codes explicitly
to retry DELETE requests instead of checking specific error code.
* subversion/libsvn_ra_serf/commit.c
(delete_entry): Set HANDLER->NO_FAIL_ON_HTTP_FAILURE_STATUS to TRUE.
Modified:
subversion/trunk/subversion/libsvn_ra_serf/commit.c
Modified: subversion/trunk/subversion/libsvn_ra_serf/commit.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/commit.c?rev=1739280&r1=1739279&r2=1739280&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Fri Apr 15 11:01:08 2016
@@ -1415,7 +1415,6 @@ delete_entry(const char *path,
delete_context_t *delete_ctx;
svn_ra_serf__handler_t *handler;
const char *delete_target;
- svn_error_t *err;
if (USING_HTTPV2_COMMIT_SUPPORT(dir->commit_ctx))
{
@@ -1449,13 +1448,12 @@ delete_entry(const char *path,
handler->method = "DELETE";
handler->path = delete_target;
+ handler->no_fail_on_http_failure_status = TRUE;
- err = svn_ra_serf__context_run_one(handler, pool);
- if (err && err->apr_err == SVN_ERR_RA_DAV_REQUEST_FAILED
- && handler->sline.code == 400)
- {
- svn_error_clear(err);
+ SVN_ERR(svn_ra_serf__context_run_one(handler, pool));
+ if (handler->sline.code == 400)
+ {
/* Try again with non-standard body to overcome Apache Httpd
header limit */
delete_ctx->non_recursive_if = TRUE;
@@ -1477,8 +1475,9 @@ delete_entry(const char *path,
SVN_ERR(svn_ra_serf__context_run_one(handler, pool));
}
- else
- SVN_ERR(err);
+
+ if (handler->server_error)
+ return svn_ra_serf__server_error_create(handler, pool);
/* 204 No Content: item successfully deleted */
if (handler->sline.code != 204)