subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject svn commit: r1102173 - /subversion/trunk/subversion/libsvn_ra_serf/update.c
Date Thu, 12 May 2011 05:54:46 GMT
Author: jerenkrantz
Date: Thu May 12 05:54:46 2011
New Revision: 1102173

URL: http://svn.apache.org/viewvc?rev=1102173&view=rev
Log:
ra_serf: Tell the server it is okay to gzip the REPORT response.

For a simple checkout (notes dir in SVN), this reduces the bytes transferred
on that connection from 82,064 bytes to 16,186 bytes.  Larger dirs will have
even bigger REPORT responses (as it contains the list of every path to
checkout with some essential properties).

* subversion/libsvn_ra_serf/update.c
  (headers_report): Add a header delegate to permit gzip responses.
  (finish_report): Install appropriate header delegate.

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=1102173&r1=1102172&r2=1102173&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/update.c Thu May 12 05:54:46 2011
@@ -2241,6 +2241,18 @@ create_update_report_body(serf_bucket_t 
 }
 
 static svn_error_t *
+headers_report(serf_bucket_t *headers,
+               void *baton,
+               apr_pool_t *pool)
+{
+  report_context_t *report = baton;
+
+  serf_bucket_headers_setn(headers, "Accept-Encoding", "gzip");
+
+  return SVN_NO_ERROR;
+}
+
+static svn_error_t *
 finish_report(void *report_baton,
               apr_pool_t *pool)
 {
@@ -2288,6 +2300,8 @@ finish_report(void *report_baton,
   handler->body_type = "text/xml";
   handler->conn = sess->conns[0];
   handler->session = sess;
+  handler->header_delegate = headers_report;
+  handler->header_delegate_baton = report;
 
   parser_ctx = apr_pcalloc(pool, sizeof(*parser_ctx));
 



Mime
View raw message