You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Brian Akins <ba...@web.turner.com> on 2005/12/20 21:35:58 UTC
Re: [PATCH] 2.1.9, proxy_http, sub requests
Still no comments on this?
Brian Akins wrote:
> Here's a patch that removes the explicit discrimination against
> keep-alives for sub requests.
>
>
>
> ------------------------------------------------------------------------
>
> diff -ru httpd-2.1.9-beta/modules/proxy/mod_proxy_http.c httpd-2.1.9-beta-new/modules/proxy/mod_proxy_http.c
> --- httpd-2.1.9-beta/modules/proxy/mod_proxy_http.c 2005-10-21 17:54:27.000000000 -0400
> +++ httpd-2.1.9-beta-new/modules/proxy/mod_proxy_http.c 2005-11-15 07:40:25.000000000 -0500
> @@ -802,15 +802,9 @@
> /* We have headers, let's figure out our request body... */
> input_brigade = apr_brigade_create(p, bucket_alloc);
>
> - /* sub-requests never use keepalives, and mustn't pass request bodies.
> - * Because the new logic looks at input_brigade, we will self-terminate
> - * input_brigade and jump past all of the request body logic...
> - * Reading anything with ap_get_brigade is likely to consume the
> - * main request's body or read beyond EOS - which would be unplesant.
> + /* sub-requests mustn't pass request bodies.
> */
> if (r->main) {
> - /* XXX: Why DON'T sub-requests use keepalives? */
> - p_conn->close++;
> if (old_cl_val) {
> old_cl_val = NULL;
> apr_table_unset(r->headers_in, "Content-Length");
> @@ -1662,22 +1656,16 @@
> "proxy: HTTP: serving URL %s", url);
>
>
> - /* only use stored info for top-level pages. Sub requests don't share
> - * in keepalives
> - */
> - if (!r->main) {
> - backend = (proxy_conn_rec *) ap_get_module_config(c->conn_config,
> + backend = (proxy_conn_rec *) ap_get_module_config(c->conn_config,
> &proxy_http_module);
> - }
> +
> /* create space for state information */
> if (!backend) {
> if ((status = ap_proxy_acquire_connection(proxy_function, &backend,
> worker, r->server)) != OK)
> goto cleanup;
> -
> - if (!r->main) {
> - ap_set_module_config(c->conn_config, &proxy_http_module, backend);
> - }
> +
> + ap_set_module_config(c->conn_config, &proxy_http_module, backend);
> }
>
> backend->is_ssl = is_ssl;
--
Brian Akins
Lead Systems Engineer
CNN Internet Technologies