You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2013/01/22 08:56:21 UTC

svn commit: r1436783 - /subversion/trunk/subversion/libsvn_ra_serf/update.c

Author: ivan
Date: Tue Jan 22 07:56:21 2013
New Revision: 1436783

URL: http://svn.apache.org/viewvc?rev=1436783&view=rev
Log:
ra_serf: Add 'svndiff1' and 'svndiff' to Accept-Encoding header in update 
report request.

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=1436783&r1=1436782&r2=1436783&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/update.c Tue Jan 22 07:56:21 2013
@@ -2738,6 +2738,28 @@ create_update_report_body(serf_bucket_t 
   return SVN_NO_ERROR;
 }
 
+/* Serf callback to setup update request headers. */
+static svn_error_t *
+setup_update_report_headers(serf_bucket_t *headers,
+                            void *baton,
+                            apr_pool_t *pool)
+{
+  report_context_t *report = baton;
+
+  if (report->sess->using_compression)
+    {
+      serf_bucket_headers_setn(headers, "Accept-Encoding",
+                               "gzip;svndiff1;q=0.9,svndiff;q=0.8");
+    }
+  else
+    {
+      serf_bucket_headers_setn(headers, "Accept-Encoding",
+                               "svndiff1;q=0.9,svndiff;q=0.8");
+    }
+
+  return SVN_NO_ERROR;
+}
+
 static svn_error_t *
 finish_report(void *report_baton,
               apr_pool_t *pool)
@@ -2783,6 +2805,9 @@ finish_report(void *report_baton,
   handler->body_delegate = create_update_report_body;
   handler->body_delegate_baton = report;
   handler->body_type = "text/xml";
+  handler->custom_accept_encoding = TRUE;
+  handler->header_delegate = setup_update_report_headers;
+  handler->header_delegate_baton = report;
   handler->conn = sess->conns[0];
   handler->session = sess;
 



Re: svn commit: r1436783 - /subversion/trunk/subversion/libsvn_ra_serf/update.c

Posted by Ivan Zhakov <iv...@apache.org>.
On Tue, Jan 22, 2013 at 5:05 PM, Bert Huijben <be...@qqmail.nl> wrote:
>> -----Original Message-----
>> From: ivan@apache.org [mailto:ivan@apache.org]
>> Sent: dinsdag 22 januari 2013 08:56
>> To: commits@subversion.apache.org
>> Subject: svn commit: r1436783 -
>> /subversion/trunk/subversion/libsvn_ra_serf/update.c
>>
>> Author: ivan
>> Date: Tue Jan 22 07:56:21 2013
>> New Revision: 1436783
>>
>> URL: http://svn.apache.org/viewvc?rev=1436783&view=rev
>> Log:
>> ra_serf: Add 'svndiff1' and 'svndiff' to Accept-Encoding header in update
>> report request.
>
> Should we backport this to 1.7.x?
>
> Or doesn't this trigger the more efficient wire protocol?
>
ra_serf 1.7.x doesn't support bulk-mode updates with embedded deltas,
so it doesn't makes sense to backport change to 1.7.x


-- 
Ivan Zhakov
VisualSVN Team

RE: svn commit: r1436783 - /subversion/trunk/subversion/libsvn_ra_serf/update.c

Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: ivan@apache.org [mailto:ivan@apache.org]
> Sent: dinsdag 22 januari 2013 08:56
> To: commits@subversion.apache.org
> Subject: svn commit: r1436783 -
> /subversion/trunk/subversion/libsvn_ra_serf/update.c
> 
> Author: ivan
> Date: Tue Jan 22 07:56:21 2013
> New Revision: 1436783
> 
> URL: http://svn.apache.org/viewvc?rev=1436783&view=rev
> Log:
> ra_serf: Add 'svndiff1' and 'svndiff' to Accept-Encoding header in update
> report request.

Should we backport this to 1.7.x?

Or doesn't this trigger the more efficient wire protocol?

	Bert