You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by George Schizas <gs...@gmail.com> on 2013/06/27 17:50:19 UTC

1.8.0 bug: Incorrect Accept-Encoding header causes Subversion client to fail to update from Apache httpd behind IIS as reverse proxy.

When doing an svn checkout (or svn update), on a repo that is served by
Apache httpd with IIS as a reverse proxy (you are connecting to IIS, not
directly Apache), a HTTP 400 error is thrown (really from IIS).

The problem is that the Accept-Encoding header is the following:

gzip;svndiff1;q=0.9,svndiff;q=0.8

But it should be:

gzip,svndiff1;q=0.9,svndiff;q=0.8

or
​perhaps
:

gzip;q=1.0, svndiff1;q=0.9, svndiff;q=0.8

​T​
he difference is that after gzip there should be a comma, not a semicolon.
​ Semicolons are only meant to separate the accepted encoding from the "q"
parameter. Separate encodings are supposed to be separated by commas.​


As it currently stands, it's not a particularly good HTTP header. Obviously
Apache fixes the error silently, but IIS doesn't.

The problem lies in the file subversion/libsvn_ra_serf/update.c, which was
changed in r1436783, by Ivan Zhakov.

There is a workaround, to disable http compression for any server that
exhibits the problem (by setting http-compression = no in the servers file).

The actual solution, is very simple, so, I'm proposing a patch below
​ (it's just one character).​
​ This is
 the first time I'm
​posting to this list
, so
​let me
know if I should also post this to the dev list
​ or anywhere else​
.


Index: subversion/libsvn_ra_serf/update.c
===================================================================
--- subversion/libsvn_ra_serf/update.c (revision 1497385)
+++ subversion/libsvn_ra_serf/update.c (working copy)
@@ -2739,7 +2739,7 @@ setup_update_report_headers(serf_bucket_t *headers
   if (report->sess->using_compression)
     {
       serf_bucket_headers_setn(headers, "Accept-Encoding",
-                               "gzip;svndiff1;q=0.9,svndiff;q=0.8");
+                               "gzip,svndiff1;q=0.9,svndiff;q=0.8");
     }
   else
     {








-- 
George Schizas
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Afhse me mono mou, emena kai ton klwno mou
Leave me alone, just me and my clone

Re: 1.8.0 bug: Incorrect Accept-Encoding header causes Subversion client to fail to update from Apache httpd behind IIS as reverse proxy.

Posted by Daniel Shahaf <da...@elego.de>.
Greg Stein wrote on Thu, Jun 27, 2013 at 20:10:55 +0000:
> On Thu, Jun 27, 2013 at 05:51:22PM +0100, Philip Martin wrote:
> > George Schizas <gs...@gmail.com> writes:
> > 
> > > know if I should also post this to the dev list
> > 
> > Yes, patches to dev please.
> 
> No need. I've already patched it: r1497551. We should backport this to
> the 1.8.x series.

For the record, the change has been nominated for backport and I expect
it will be included in 1.8.1.

Re: 1.8.0 bug: Incorrect Accept-Encoding header causes Subversion client to fail to update from Apache httpd behind IIS as reverse proxy.

Posted by Daniel Shahaf <da...@elego.de>.
Greg Stein wrote on Thu, Jun 27, 2013 at 20:10:55 +0000:
> On Thu, Jun 27, 2013 at 05:51:22PM +0100, Philip Martin wrote:
> > George Schizas <gs...@gmail.com> writes:
> > 
> > > know if I should also post this to the dev list
> > 
> > Yes, patches to dev please.
> 
> No need. I've already patched it: r1497551. We should backport this to
> the 1.8.x series.

For the record, the change has been nominated for backport and I expect
it will be included in 1.8.1.

Re: 1.8.0 bug: Incorrect Accept-Encoding header causes Subversion client to fail to update from Apache httpd behind IIS as reverse proxy.

Posted by Greg Stein <gs...@gmail.com>.
On Thu, Jun 27, 2013 at 05:51:22PM +0100, Philip Martin wrote:
> George Schizas <gs...@gmail.com> writes:
> 
> > know if I should also post this to the dev list
> 
> Yes, patches to dev please.

No need. I've already patched it: r1497551. We should backport this to
the 1.8.x series.

Thanks, George!

Cheers,
-g

Re: 1.8.0 bug: Incorrect Accept-Encoding header causes Subversion client to fail to update from Apache httpd behind IIS as reverse proxy.

Posted by Greg Stein <gs...@gmail.com>.
On Thu, Jun 27, 2013 at 05:51:22PM +0100, Philip Martin wrote:
> George Schizas <gs...@gmail.com> writes:
> 
> > know if I should also post this to the dev list
> 
> Yes, patches to dev please.

No need. I've already patched it: r1497551. We should backport this to
the 1.8.x series.

Thanks, George!

Cheers,
-g

Re: 1.8.0 bug: Incorrect Accept-Encoding header causes Subversion client to fail to update from Apache httpd behind IIS as reverse proxy.

Posted by Philip Martin <ph...@wandisco.com>.
George Schizas <gs...@gmail.com> writes:

> know if I should also post this to the dev list

Yes, patches to dev please.

-- 
Philip Martin | Subversion Committer
WANdisco | Non-Stop Data
www.wandisco.com