You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/01/26 11:32:47 UTC
svn commit: r1654755 - in /subversion/trunk/subversion/libsvn_ra_serf:
commit.c get_lock.c property.c util.c
Author: rhuijben
Date: Mon Jan 26 10:32:46 2015
New Revision: 1654755
URL: http://svn.apache.org/r1654755
Log:
With the standardized handler setup functions we can be a bit smarter on
when to setup which headers. We are no longer in the business of writing
a generic Delta/V client, so avoid doing additional work for nobody.
* subversion/libsvn_ra_serf/commit.c
(add_file): Disable DAV headers on this HEAD request.
* subversion/libsvn_ra_serf/get_lock.c
(svn_ra_serf__get_lock): Disable DAV headers on this PROPFIND request.
* subversion/libsvn_ra_serf/property.c
(svn_ra_serf__create_propfind_handler): Disable DAV headers on these
PROPFIND requests.
* subversion/libsvn_ra_serf/util.c
(setup_serf_req): Tweak comment.
Modified:
subversion/trunk/subversion/libsvn_ra_serf/commit.c
subversion/trunk/subversion/libsvn_ra_serf/get_lock.c
subversion/trunk/subversion/libsvn_ra_serf/property.c
subversion/trunk/subversion/libsvn_ra_serf/util.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=1654755&r1=1654754&r2=1654755&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/commit.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/commit.c Mon Jan 26 10:32:46 2015
@@ -1758,6 +1758,7 @@ add_file(const char *path,
path, scratch_pool);
handler->response_handler = svn_ra_serf__expect_empty_body;
handler->response_baton = handler;
+ handler->no_dav_headers = TRUE; /* Read only operation outside txn */
err = svn_ra_serf__context_run_one(handler, scratch_pool);
Modified: subversion/trunk/subversion/libsvn_ra_serf/get_lock.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/get_lock.c?rev=1654755&r1=1654754&r2=1654755&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/get_lock.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/get_lock.c Mon Jan 26 10:32:46 2015
@@ -305,6 +305,8 @@ svn_ra_serf__get_lock(svn_ra_session_t *
handler->header_delegate = setup_getlock_headers;
handler->header_delegate_baton = lock_ctx;
+ handler->no_dav_headers = TRUE;
+
lock_ctx->inner_handler = handler->response_handler;
lock_ctx->inner_baton = handler->response_baton;
handler->response_handler = handle_lock;
Modified: subversion/trunk/subversion/libsvn_ra_serf/property.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/property.c?rev=1654755&r1=1654754&r2=1654755&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/property.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/property.c Mon Jan 26 10:32:46 2015
@@ -495,6 +495,8 @@ svn_ra_serf__create_propfind_handler(svn
handler->header_delegate = setup_propfind_headers;
handler->header_delegate_baton = new_prop_ctx;
+ handler->no_dav_headers = TRUE;
+
new_prop_ctx->handler = handler;
*propfind_handler = handler;
Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1654755&r1=1654754&r2=1654755&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Mon Jan 26 10:32:46 2015
@@ -831,9 +831,14 @@ setup_serf_req(serf_request_t *request,
serf_bucket_headers_setn(*hdrs_bkt, "Accept-Encoding", accept_encoding);
}
- /* These headers need to be sent with every request except GET; see
+ /* These headers need to be sent with every request that might need
+ capability processing (e.g. during commit, reports, etc.), see
issue #3255 ("mod_dav_svn does not pass client capabilities to
- start-commit hooks") for why. */
+ start-commit hooks") for why.
+
+ Some request types like GET/HEAD/PROPFIND are unaware of capability
+ handling; and in some cases the responses can even be cached by
+ proxies, so we don't have to send these hearders there. */
if (dav_headers)
{
serf_bucket_headers_setn(*hdrs_bkt, "DAV", SVN_DAV_NS_DAV_SVN_DEPTH);