You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ko...@apache.org on 2017/08/24 11:39:11 UTC

svn commit: r1806030 - /subversion/trunk/subversion/libsvn_ra_serf/merge.c

Author: kotkov
Date: Thu Aug 24 11:39:10 2017
New Revision: 1806030

URL: http://svn.apache.org/viewvc?rev=1806030&view=rev
Log:
Following up on r1806017, send X-SVN-Options values separated by spaces,
instead of joining them via comma as per what serf_bucket_headers_set()
does when called multiple times with identical header names.

In other words, send "release-locks no-merge-response" instead of "release-
locks, no-merge-response", as this is what ra_neon has been doing previously.

* subversion/libsvn_ra_serf/merge.c
  (setup_merge_headers): Separate option values with spaces.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/merge.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/merge.c?rev=1806030&r1=1806029&r2=1806030&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/merge.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/merge.c Thu Aug 24 11:39:10 2017
@@ -275,11 +275,11 @@ setup_merge_headers(serf_bucket_t *heade
                     apr_pool_t *scratch_pool)
 {
   merge_context_t *ctx = baton;
+  svn_stringbuf_t *val = svn_stringbuf_create_empty(scratch_pool);
 
   if (!ctx->keep_locks)
     {
-      serf_bucket_headers_set(headers, SVN_DAV_OPTIONS_HEADER,
-                              SVN_DAV_OPTION_RELEASE_LOCKS);
+      svn_stringbuf_appendcstr(val, SVN_DAV_OPTION_RELEASE_LOCKS);
     }
 
   /* We don't need the full merge response when working over HTTPv2.
@@ -288,10 +288,13 @@ setup_merge_headers(serf_bucket_t *heade
   if (SVN_RA_SERF__HAVE_HTTPV2_SUPPORT(ctx->session) ||
       ctx->session->wc_callbacks->push_wc_prop == NULL)
     {
-      serf_bucket_headers_set(headers, SVN_DAV_OPTIONS_HEADER,
-                              SVN_DAV_OPTION_NO_MERGE_RESPONSE);
+      if (val->len > 0)
+        svn_stringbuf_appendcstr(val, " ");
+      svn_stringbuf_appendcstr(val, SVN_DAV_OPTION_NO_MERGE_RESPONSE);
     }
 
+  serf_bucket_headers_set(headers, SVN_DAV_OPTIONS_HEADER, val->data);
+
   return SVN_NO_ERROR;
 }