httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Aleksey Midenkov <...@uezku.kemsu.ru>
Subject Re: AP_CONN_CLOSE on force-response-1.0
Date Tue, 09 Oct 2007 19:32:34 GMT
On Tuesday 09 October 2007 22:12, Jim Jagielski wrote:

> All I'm saying is that, iirc, the intent of force-response-1.0 is
> to force a 1.0 response and disable keepalives... it was designed
> to work around buggy browsers that had problems with 1.1 features,
> including wonky 1.0-type keepalives.

Actually, there is no problem to figure out from where the line had came 
first:

> httpd-1.3.x/src/main$ svn diff -r 78966:78967
> Index: http_protocol.c
> ===================================================================
> --- http_protocol.c     (revision 78966)
> +++ http_protocol.c     (revision 78967)
> @@ -1090,9 +1090,16 @@
>      if (!r->status_line)
>          r->status_line = status_lines[index_of_response(r->status)];
>
> -    if (r->proto_num == 1000
> -       && table_get(r->subprocess_env,"force-response-1.0"))
> +    /* mod_proxy is only HTTP/1.0, so avoid sending HTTP/1.1 error
> response; +     * kluge around broken browsers when indicated by
> force-response-1.0 +     */
> +    if (r->proxyreq
> +       || (r->proto_num == 1000
> +           && table_get(r->subprocess_env,"force-response-1.0"))) {
> +
>         protocol = "HTTP/1.0";
> +       r->connection->keepalive = -1;
> +    }
>      else
>         protocol = SERVER_PROTOCOL;
>
> httpd-1.3.x/src/main$ svn log -r 78967 http_protocol.c
> ------------------------------------------------------------------------
> r78967 | fielding | 1997-08-15 21:59:52 +0400 (Fri, 15 Aug 1997) | 3 lines
>
> Force proxy to always respond as HTTP/1.0, which it was failing to
> do for errors and cached responses.
>
> ------------------------------------------------------------------------

No word about buggy browsers in the comment. The r->proxyreq condition was 
removed later, but keepalive assignment had left untouched.

On Thursday 15 March 2001 13:00, Graham Leggett wrote:
> Hi all,
>
> This patch stops the forced downgrade of the connection to HTTP/1.0 for
> proxy requests.
>
> Work is currently being done to ensure that mod_proxy is compliant with
> HTTP/1.1 - the downgrade needs to go for this to work :)
>
> Regards,
> Graham

The patch was committed.

> httpd-2.0/modules/http$ svn log -r 88528 http_protocol.c
> ------------------------------------------------------------------------
> r88528 | chuck | 2001-03-16 10:37:12 +0300 (Fri, 16 Mar 2001) | 4 lines
>
> Stops the forced downgrade of the connection to HTTP/1.0 for proxy
> requests. Submitted by:   Graham Leggett
> Reviewed by:    Chuck Murcko
>
> ------------------------------------------------------------------------
>
> httpd-2.0/modules/http$ svn diff -r 88527:88528 http_protocol.c
> Index: http_protocol.c
> ===================================================================
> --- http_protocol.c     (revision 88527)
> +++ http_protocol.c     (revision 88528)
> @@ -770,12 +770,10 @@
>      if (!r->status_line)
>          r->status_line = status_lines[ap_index_of_response(r->status)];
>
> -    /* mod_proxy is only HTTP/1.0, so avoid sending HTTP/1.1 error
> response; -     * kluge around broken browsers when indicated by
> force-response-1.0 +    /* kluge around broken browsers when indicated by
> force-response-1.0 */
> -    if (r->proxyreq
> -        || (r->proto_num == HTTP_VERSION(1,0)
> -            && apr_table_get(r->subprocess_env, "force-response-1.0")))
{
> +    if (r->proto_num == HTTP_VERSION(1,0)
> +            && apr_table_get(r->subprocess_env, "force-response-1.0"))
{
>
>          *protocol = "HTTP/1.0";
>          r->connection->keepalive = -1;

Mime
View raw message