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

Re: svn commit: r1496470 - in /subversion/trunk/subversion: include/svn_config.h libsvn_ra_serf/ra_serf.h libsvn_ra_serf/serf.c libsvn_ra_serf/util.c libsvn_subr/config_file.c

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 25 Jun 2013 14:33:52 -0400

We talked about a •dynamic* test, so that a (laptop) connecting
through different proxies could choose whether to use C-L.

On Tue, Jun 25, 2013 at 9:36 AM, <ivan_at_apache.org> wrote:
> Author: ivan
> Date: Tue Jun 25 13:36:48 2013
> New Revision: 1496470
>
> URL: http://svn.apache.org/r1496470
> Log:
> Add new 'http-chunked-requests' configuration option to control using
> of chunked transfer encoding for HTTP/1.1 servers.
>
> * subversion/include/svn_config.h
> (SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS): New.
>
> * subversion/libsvn_ra_serf/ra_serf.h
> (svn_ra_serf__session_t): Add USING_CHUNKED_REQUESTS flag.
>
> * subversion/libsvn_ra_serf/serf.c
> (load_config): Parse 'http-chunked-requests' configuration option.
>
> * subversion/libsvn_ra_serf/util.c
> (setup_serf_req): Set Content-Length if USING_CHUNKED_REQUESTS is zero.
>
> * subversion/libsvn_subr/config_file.c
> (svn_config_ensure): Mention 'http-chunked-requests' in 'servers' file
> template.
>
> Modified:
> subversion/trunk/subversion/include/svn_config.h
> subversion/trunk/subversion/libsvn_ra_serf/ra_serf.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
>
> Modified: subversion/trunk/subversion/include/svn_config.h
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_config.h?rev=1496470&r1=1496469&r2=1496470&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/include/svn_config.h (original)
> +++ subversion/trunk/subversion/include/svn_config.h Tue Jun 25 13:36:48 2013
> @@ -95,6 +95,8 @@ typedef struct svn_config_t svn_config_t
> #define SVN_CONFIG_OPTION_HTTP_BULK_UPDATES "http-bulk-updates"
> /** @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_CHUNKED_REQUESTS "http-chunked-requests"
>
> #define SVN_CONFIG_CATEGORY_CONFIG "config"
> #define SVN_CONFIG_SECTION_AUTH "auth"
>
> Modified: subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h?rev=1496470&r1=1496469&r2=1496470&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h (original)
> +++ subversion/trunk/subversion/libsvn_ra_serf/ra_serf.h Tue Jun 25 13:36:48 2013
> @@ -144,6 +144,9 @@ struct svn_ra_serf__session_t {
> HTTP/1.0. Thus, we cannot send chunked requests. */
> svn_boolean_t http10;
>
> + /* Should we use Transfer-Encoding: chunked for HTTP/1.1 servers. */
> + svn_boolean_t using_chunked_requests;
> +
> /* Our Version-Controlled-Configuration; may be NULL until we know it. */
> const char *vcc_url;
>
>
> Modified: subversion/trunk/subversion/libsvn_ra_serf/serf.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/serf.c?rev=1496470&r1=1496469&r2=1496470&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_ra_serf/serf.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_serf/serf.c Tue Jun 25 13:36:48 2013
> @@ -225,6 +225,11 @@ load_config(svn_ra_serf__session_t *sess
> SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS,
> SVN_CONFIG_DEFAULT_OPTION_HTTP_MAX_CONNECTIONS));
>
> + SVN_ERR(svn_config_get_bool(config, &session->using_chunked_requests,
> + SVN_CONFIG_SECTION_GLOBAL,
> + SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS,
> + TRUE));
> +
> if (config)
> server_group = svn_config_find_group(config,
> session->session_url.hostname,
> @@ -281,6 +286,12 @@ load_config(svn_ra_serf__session_t *sess
> server_group,
> SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS,
> session->max_connections));
> +
> + SVN_ERR(svn_config_get_bool(
> + config, &session->using_chunked_requests,
> + server_group,
> + SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS,
> + session->using_chunked_requests));
> }
>
> /* Don't allow the http-max-connections value to be larger than our
>
> Modified: subversion/trunk/subversion/libsvn_ra_serf/util.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/util.c?rev=1496470&r1=1496469&r2=1496470&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_ra_serf/util.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_serf/util.c Tue Jun 25 13:36:48 2013
> @@ -641,8 +641,9 @@ setup_serf_req(serf_request_t *request,
> serf_bucket_alloc_t *allocator = serf_request_get_alloc(request);
>
> svn_spillbuf_t *buf;
> + svn_boolean_t set_CL = session->http10 || !session->using_chunked_requests;
>
> - if (session->http10 && body_bkt != NULL)
> + if (set_CL && body_bkt != NULL)
> {
> /* Ugh. Use HTTP/1.0 to talk to the server because we don't know if
> it speaks HTTP/1.1 (and thus, chunked requests), or because the
> @@ -670,7 +671,7 @@ setup_serf_req(serf_request_t *request,
>
> /* Set the Content-Length value. This will also trigger an HTTP/1.0
> request (rather than the default chunked request). */
> - if (session->http10)
> + if (set_CL)
> {
> if (body_bkt == NULL)
> serf_bucket_request_set_CL(*req_bkt, 0);
>
> Modified: subversion/trunk/subversion/libsvn_subr/config_file.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/config_file.c?rev=1496470&r1=1496469&r2=1496470&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_subr/config_file.c (original)
> +++ subversion/trunk/subversion/libsvn_subr/config_file.c Tue Jun 25 13:36:48 2013
> @@ -810,6 +810,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-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
>
>
Received on 2013-06-25 20:34:26 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.