[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1495419 - in /subversion/trunk/subversion/libsvn_ra_serf: options.c ra_serf.h serf.c util.c

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Wed, 03 Jul 2013 14:50:10 +0100

Greg Stein <gstein_at_gmail.com> writes:

> Could you try svn trunk? Set busted-proxy=yes in your config to enable
> the new behavior.
>
> Without the knob turned out, you should get a 411 error. As Stefan
> pointed out, we may want to consider detecting 411 and providing a
> better error message.
>
> With the knob enabled, it should auto-detect your nginx proxy and
> stick to using C-L requests.

I thought I used this successfully yesterday but think I was mistaken;
it certainly doesn't work for me today. I see the extra OPTIONS request
being sent and the 411 being received but the 411 handling is missed
because it's inside an "if (err)" and err is SVN_NO_ERROR. Has anyone
used this code? I need this patch:

Index: subversion/libsvn_ra_serf/options.c
===================================================================
--- subversion/libsvn_ra_serf/options.c (revision 1499379)
+++ subversion/libsvn_ra_serf/options.c (working copy)
@@ -545,7 +545,6 @@ svn_ra_serf__probe_proxy(svn_ra_serf__session_t *s
                          apr_pool_t *scratch_pool)
 {
   svn_ra_serf__handler_t *handler;
- svn_error_t *err;
 
   handler = apr_pcalloc(scratch_pool, sizeof(*handler));
   handler->handler_pool = scratch_pool;
@@ -562,27 +561,19 @@ svn_ra_serf__probe_proxy(svn_ra_serf__session_t *s
 
   /* No special headers. */
 
- err = svn_ra_serf__context_run_one(handler, scratch_pool);
- if (err)
+ SVN_ERR(svn_ra_serf__context_run_one(handler, scratch_pool));
+ /* Some versions of nginx in reverse proxy mode will return 411. They want
+ a Content-Length header, rather than chunked requests. We can keep other
+ HTTP/1.1 features, but will disable the chunking. */
+ if (handler->sline.code == 411)
     {
- /* Some versions of nginx in reverse proxy mode will return 411. They want
- a Content-Length header, rather than chunked requests. We can keep other
- HTTP/1.1 features, but will disable the chunking. */
- if (handler->sline.code == 411)
- {
- serf_sess->using_chunked_requests = FALSE;
+ serf_sess->using_chunked_requests = FALSE;
 
- svn_error_clear(err);
- return SVN_NO_ERROR;
- }
-
- return svn_error_trace(
- svn_error_compose_create(
- svn_ra_serf__error_on_status(handler->sline,
- serf_sess->session_url.path,
- handler->location),
- err));
+ return SVN_NO_ERROR;
     }
+ SVN_ERR(svn_ra_serf__error_on_status(handler->sline,
+ handler->path,
+ handler->location));
 
   return SVN_NO_ERROR;
 }

-- 
Philip Martin | Subversion Committer
WANdisco | Non-Stop Data
www.wandisco.com
Received on 2013-07-03 15:50:46 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.