subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From phi...@apache.org
Subject svn commit: r1499423 - /subversion/trunk/subversion/libsvn_ra_serf/options.c
Date Wed, 03 Jul 2013 14:40:22 GMT
Author: philip
Date: Wed Jul  3 14:40:21 2013
New Revision: 1499423

URL: http://svn.apache.org/r1499423
Log:
Fix busted-proxy detection: any 411 will be received without a
Subversion error.  Tested by tweaking the testsuite code to set
busted-proxy=yes and running the entire testsuite through nginx;
all tests pass in this configuration.  One remaining problem is
that redirect_tests.py 2 and 3 FAIL when busted-proxy is set and
the client connects directly to httpd without a proxy.

* subversion/libsvn_ra_serf/options.c
  (svn_ra_serf__probe_proxy): Handle 411 in the SVN_NO_ERROR path.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/options.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/options.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/options.c?rev=1499423&r1=1499422&r2=1499423&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/options.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/options.c Wed Jul  3 14:40:21 2013
@@ -545,7 +545,6 @@ svn_ra_serf__probe_proxy(svn_ra_serf__se
                          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__se
 
   /* 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;
-
-          svn_error_clear(err);
-          return SVN_NO_ERROR;
-        }
+      serf_sess->using_chunked_requests = FALSE;
 
-      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;
 }



Mime
View raw message