subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bre...@apache.org
Subject svn commit: r1502440 - in /subversion/branches/1.8.x-tristate-chunked-request: ./ subversion/libsvn_ra_serf/serf.c subversion/libsvn_ra_serf/util.c subversion/libsvn_subr/config_file.c
Date Fri, 12 Jul 2013 06:53:40 GMT
Author: breser
Date: Fri Jul 12 06:53:40 2013
New Revision: 1502440

URL: http://svn.apache.org/r1502440
Log:
On the 1.8.x-tristate-chunked-request branch: Merge r1502401 from the tristate-chunked-re

Conflicts and other changes necessary to make it viable for 1.8.x described below.

* subversion/include/svn_config.h:
  (SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS): Removed (can't add to public API in patch re

* subversion/libsvn_ra_serf/serf.c
  (OPTION_HTTP_CHUNKED_REQUESTS): Add
  (load_config): Lines for reading config option conflicted, chose r1502401 changes.
    Use OPTION_HTTP_CHUNKED_REQUESTS instead of SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS.

* subversion/libsvn_ra_serf/util.c
  (svn_ra_serf__error_on_status): Error test for 411 conflicted, chose r1502401 changes. 


Modified:
    subversion/branches/1.8.x-tristate-chunked-request/   (props changed)
    subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_ra_serf/serf.c
    subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_ra_serf/util.c
    subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_subr/config_file.c

Propchange: subversion/branches/1.8.x-tristate-chunked-request/
------------------------------------------------------------------------------
  Merged /subversion/branches/tristate-chunked-request:r1502401

Modified: subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_ra_serf/serf.c?rev=1502440&r1=1502439&r2=1502440&view=diff
==============================================================================
--- subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_ra_serf/serf.c Fri
Jul 12 06:53:40 2013
@@ -137,8 +137,8 @@ load_http_auth_types(apr_pool_t *pool, s
    runtime configuration variable. */
 #define DEFAULT_HTTP_TIMEOUT 600
 
-/* Private symbol for the 1.9-public SVN_CONFIG_OPTION_HTTP_DETECT_CHUNKING  */
-#define OPTION_HTTP_DETECT_CHUNKING "http-detect-chunking"
+/* Private symbol for the 1.9-public SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS */
+#define OPTION_HTTP_CHUNKED_REQUESTS "http-chunked-requests"
 
 
 static svn_error_t *
@@ -153,6 +153,7 @@ load_config(svn_ra_serf__session_t *sess
   const char *timeout_str = NULL;
   const char *exceptions;
   apr_port_t proxy_port;
+  svn_tristate_t chunked_requests;
 
   if (config_hash)
     {
@@ -229,12 +230,11 @@ load_config(svn_ra_serf__session_t *sess
                                SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS,
                                SVN_CONFIG_DEFAULT_OPTION_HTTP_MAX_CONNECTIONS));
 
-  /* Do we need to detect whether an intervening proxy does not support
-     chunked requests?  */
-  SVN_ERR(svn_config_get_bool(config, &session->detect_chunking,
-                              SVN_CONFIG_SECTION_GLOBAL,
-                              OPTION_HTTP_DETECT_CHUNKING,
-                              FALSE));
+  /* Should we use chunked transfer encoding. */ 
+  SVN_ERR(svn_config_get_tristate(config, &chunked_requests,
+                                  SVN_CONFIG_SECTION_GLOBAL,
+                                  OPTION_HTTP_CHUNKED_REQUESTS,
+                                  "auto", svn_tristate_unknown));
 
   if (config)
     server_group = svn_config_find_group(config,
@@ -293,12 +293,11 @@ load_config(svn_ra_serf__session_t *sess
                                    SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS,
                                    session->max_connections));
 
-      /* Do we need to take care with this proxy?  */
-      SVN_ERR(svn_config_get_bool(
-               config, &session->detect_chunking,
-               server_group,
-               OPTION_HTTP_DETECT_CHUNKING,
-               session->detect_chunking));
+      /* Should we use chunked transfer encoding. */ 
+      SVN_ERR(svn_config_get_tristate(config, &chunked_requests,
+                                      server_group,
+                                      OPTION_HTTP_CHUNKED_REQUESTS,
+                                      "auto", svn_tristate_unknown));
     }
 
   /* Don't allow the http-max-connections value to be larger than our
@@ -373,6 +372,24 @@ load_config(svn_ra_serf__session_t *sess
       session->using_proxy = FALSE;
     }
 
+  /* Setup detect_chunking and using_chunked_requests based on
+   * the chunked_requests tristate */
+  if (chunked_requests == svn_tristate_unknown)
+    {
+      session->detect_chunking = TRUE;
+      session->using_chunked_requests = TRUE;
+    }
+  else if (chunked_requests == svn_tristate_true)
+    {
+      session->detect_chunking = FALSE;
+      session->using_chunked_requests = TRUE;
+    }
+  else /* chunked_requests == svn_tristate_false */
+    {
+      session->detect_chunking = FALSE;
+      session->using_chunked_requests = FALSE;
+    }
+
   /* Setup authentication. */
   SVN_ERR(load_http_auth_types(pool, config, server_group,
                                &session->authn_types));

Modified: subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_ra_serf/util.c?rev=1502440&r1=1502439&r2=1502440&view=diff
==============================================================================
--- subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_ra_serf/util.c Fri
Jul 12 06:53:40 2013
@@ -2413,8 +2413,10 @@ svn_ra_serf__error_on_status(serf_status
 
       case 411:
         return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
-                                _("DAV request failed: "
-                                  "Content length required"));
+                    _("DAV request failed: 411 Content length required. The "
+                      "server or an intermediate proxy does not accept "
+                      "chunked encoding. Try setting 'http-chunked-requests' "
+                      "to 'auto' or 'no' in your client configuration."));
     }
 
   if (sline.code >= 300)

Modified: subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_subr/config_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_subr/config_file.c?rev=1502440&r1=1502439&r2=1502440&view=diff
==============================================================================
--- subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_subr/config_file.c
(original)
+++ subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_subr/config_file.c
Fri Jul 12 06:53:40 2013
@@ -834,14 +834,8 @@ svn_config_ensure(const char *config_dir
         "###   http-max-connections       Maximum number of parallel server" NL
         "###                              connections to use for any given"  NL
         "###                              HTTP operation."                   NL
-        "###   http-detect-chunking       Detect if the connection supports" NL
-        "###                              chunked requests (which some proxies"
-                                                                             NL
-        "###                              do not support). This defaults to" NL
-        "###                              off since mod_dav_svn supports "   NL
-        "###                              chunked requests and the detection"
-                                                                             NL
-        "###                              may hurt performance."             NL
+        "###   http-chunked-requests      Whether to use chunked transfer"   NL
+        "###                              encoding for HTTP requests body."  NL
         "###   neon-debug-mask            Debug mask for Neon HTTP library"  NL
         "###   ssl-authority-files        List of files, each of a trusted CA"
                                                                              NL



Mime
View raw message