subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From i...@apache.org
Subject svn commit: r1710613 - /subversion/trunk/subversion/libsvn_ra_serf/update.c
Date Mon, 26 Oct 2015 15:08:05 GMT
Author: ivan
Date: Mon Oct 26 15:08:05 2015
New Revision: 1710613

URL: http://svn.apache.org/viewvc?rev=1710613&view=rev
Log:
ra_serf: Do not advertise svndiff1 support if user explicitly disabled HTTP
compression via 'http-compression=off' configuration option. The only
difference between svndiff1 and svndiff0 that svndiff1 supports compression.

* subversion/libsvn_ra_serf/update.c
  (headers_fetch, setup_update_report_headers): Do not add 'svndiff1' to
   Accept-Encoding request header if we're not using compression.

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

Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/update.c?rev=1710613&r1=1710612&r2=1710613&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/update.c Mon Oct 26 15:08:05 2015
@@ -941,8 +941,17 @@ headers_fetch(serf_bucket_t *headers,
     {
       serf_bucket_headers_setn(headers, SVN_DAV_DELTA_BASE_HEADER,
                                fetch_ctx->delta_base);
-      serf_bucket_headers_setn(headers, "Accept-Encoding",
-                               "svndiff1;q=0.9,svndiff;q=0.8");
+      if (fetch_ctx->using_compression)
+        {
+          serf_bucket_headers_setn(headers, "Accept-Encoding",
+                                   "svndiff1;q=0.9,svndiff;q=0.8");
+        }
+      else
+        {
+          /* Do not advertise svndiff1 support if we're not interested in
+             compression. */
+          serf_bucket_headers_setn(headers, "Accept-Encoding", "svndiff;q=0.9");
+        }
     }
   else if (fetch_ctx->using_compression)
     {
@@ -2351,8 +2360,9 @@ setup_update_report_headers(serf_bucket_
     }
   else
     {
-      serf_bucket_headers_setn(headers, "Accept-Encoding",
-                               "svndiff1;q=0.9,svndiff;q=0.8");
+      /* Do not advertise svndiff1 support if we're not interested in
+         compression. */
+      serf_bucket_headers_setn(headers, "Accept-Encoding", "svndiff;q=0.9");
     }
 
   return SVN_NO_ERROR;



Mime
View raw message