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