You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by je...@apache.org on 2011/05/12 07:54:46 UTC
svn commit: r1102173 - /subversion/trunk/subversion/libsvn_ra_serf/update.c
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));
Re: svn commit: r1102173 - /subversion/trunk/subversion/libsvn_ra_serf/update.c
Posted by Justin Erenkrantz <ju...@gmail.com>.
On Wed, May 11, 2011 at 11:13 PM, Ivan Zhakov <iv...@visualsvn.com> wrote:
> There is configuration option in servers file. ra_serf should enable
> compression only if option is enabled.
r1102178. Thanks! -- justin
Re: svn commit: r1102173 - /subversion/trunk/subversion/libsvn_ra_serf/update.c
Posted by Ivan Zhakov <iv...@visualsvn.com>.
On Thu, May 12, 2011 at 09:54, <je...@apache.org> wrote:
> 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).
>
There is configuration option in servers file. ra_serf should enable
compression only if option is enabled.
--
Ivan Zhakov