You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2013/07/12 22:44:59 UTC
svn commit: r1502685 - in /subversion/trunk: ./
subversion/include/svn_config.h subversion/libsvn_ra_serf/serf.c
subversion/libsvn_ra_serf/util.c subversion/libsvn_subr/config_file.c
Author: breser
Date: Fri Jul 12 20:44:58 2013
New Revision: 1502685
URL: http://svn.apache.org/r1502685
Log:
Merge tristate-chunked-requests branch onto trunk.
subversion/include/svn_config.h
(SVN_CONFIG_OPTION_HTTP_DETECT_CHUNKING): Renamed to ...
(SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS): New.
* subversion/libsvn_ra_serf/serf.c
(load_config): Switch to using the tristate option.
* subversion/libsvn_ra_serf/util.c
(svn_ra_serf__error_on_status): Suggest the tristate option be set to auto
or no when we get a 411.
* subversion/libsvn_subr/config_file.c
(svn_config_ensure): Update to reflect change in config option.
Modified:
subversion/trunk/ (props changed)
subversion/trunk/subversion/include/svn_config.h
subversion/trunk/subversion/libsvn_ra_serf/serf.c
subversion/trunk/subversion/libsvn_ra_serf/util.c
subversion/trunk/subversion/libsvn_subr/config_file.c
Propchange: subversion/trunk/
------------------------------------------------------------------------------
Merged /subversion/branches/tristate-chunked-request:r1502394-1502681
Modified: subversion/trunk/subversion/include/svn_config.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_config.h?rev=1502685&r1=1502684&r2=1502685&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_config.h (original)
+++ subversion/trunk/subversion/include/svn_config.h Fri Jul 12 20:44:58 2013
@@ -96,7 +96,7 @@ typedef struct svn_config_t svn_config_t
/** @since New in 1.8. */
#define SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS "http-max-connections"
/** @since New in 1.9. */
-#define SVN_CONFIG_OPTION_HTTP_DETECT_CHUNKING "http-detect-chunking"
+#define SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS "http-chunked-requests"
#define SVN_CONFIG_CATEGORY_CONFIG "config"
#define SVN_CONFIG_SECTION_AUTH "auth"
Modified: subversion/trunk/subversion/libsvn_ra_serf/serf.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/serf.c?rev=1502685&r1=1502684&r2=1502685&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/serf.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/serf.c Fri Jul 12 20:44:58 2013
@@ -149,6 +149,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)
{
@@ -225,12 +226,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,
- SVN_CONFIG_OPTION_HTTP_DETECT_CHUNKING,
- FALSE));
+ /* Should we use chunked transfer encoding. */
+ SVN_ERR(svn_config_get_tristate(config, &chunked_requests,
+ SVN_CONFIG_SECTION_GLOBAL,
+ SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS,
+ "auto", svn_tristate_unknown));
if (config)
server_group = svn_config_find_group(config,
@@ -289,12 +289,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,
- SVN_CONFIG_OPTION_HTTP_DETECT_CHUNKING,
- session->detect_chunking));
+ /* Should we use chunked transfer encoding. */
+ SVN_ERR(svn_config_get_tristate(config, &chunked_requests,
+ server_group,
+ SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS,
+ "auto", chunked_requests));
}
/* Don't allow the http-max-connections value to be larger than our
@@ -369,6 +368,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/trunk/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1502685&r1=1502684&r2=1502685&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/util.c Fri Jul 12 20:44:58 2013
@@ -2444,9 +2444,8 @@ svn_ra_serf__error_on_status(serf_status
return svn_error_createf(SVN_ERR_RA_DAV_REQUEST_FAILED, NULL,
_("DAV request failed: 411 Content length required. The "
"server or an intermediate proxy does not accept "
- "chunked encoding. Try setting "
- "'http-detect-chunking=yes' "
- "in your client configuration."));
+ "chunked encoding. Try setting 'http-chunked-requests' "
+ "to 'auto' or 'no' in your client configuration."));
}
if (sline.code >= 300)
Modified: subversion/trunk/subversion/libsvn_subr/config_file.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/config_file.c?rev=1502685&r1=1502684&r2=1502685&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/config_file.c (original)
+++ subversion/trunk/subversion/libsvn_subr/config_file.c Fri Jul 12 20:44:58 2013
@@ -838,14 +838,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