Re: WGLC p1: proxy handling of a really bad Content-Length

Alex Rousskov <rousskov@measurement-factory.com> Wed, 01 May 2013 07:45 UTC

Return-Path: <ietf-http-wg-request@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 3204721F8D92 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 1 May 2013 00:45:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.574
X-Spam-Level:
X-Spam-Status: No, score=-10.574 tagged_above=-999 required=5 tests=[AWL=0.025, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 65Fh7ntVrEzZ for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 1 May 2013 00:45:52 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id BB2BE21F8B60 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 1 May 2013 00:45:52 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UXRjM-0008Nw-KE for ietf-http-wg-dist@listhub.w3.org; Wed, 01 May 2013 07:45:36 +0000
Resent-Date: Wed, 01 May 2013 07:45:36 +0000
Resent-Message-Id: <E1UXRjM-0008Nw-KE@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <rousskov@measurement-factory.com>) id 1UXRjC-0008C3-7B for ietf-http-wg@listhub.w3.org; Wed, 01 May 2013 07:45:26 +0000
Received: from measurement-factory.com ([209.169.10.130]) by maggie.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <rousskov@measurement-factory.com>) id 1UXRjB-0001dW-51 for ietf-http-wg@w3.org; Wed, 01 May 2013 07:45:26 +0000
Received: from [127.0.0.1] (localhost [127.0.0.1]) (authenticated bits=0) by measurement-factory.com (8.14.3/8.14.3) with ESMTP id r417ifqr084460 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 1 May 2013 01:44:41 -0600 (MDT) (envelope-from rousskov@measurement-factory.com)
Message-ID: <5180C7E1.3010509@measurement-factory.com>
Date: Wed, 01 May 2013 01:44:33 -0600
From: Alex Rousskov <rousskov@measurement-factory.com>
User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130329 Thunderbird/17.0.5
MIME-Version: 1.0
To: HTTP Working Group <ietf-http-wg@w3.org>
CC: Willy Tarreau <w@1wt.eu>
References: <5180B982.9050003@measurement-factory.com> <20130501072644.GI27137@1wt.eu>
In-Reply-To: <20130501072644.GI27137@1wt.eu>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=209.169.10.130; envelope-from=rousskov@measurement-factory.com; helo=measurement-factory.com
X-W3C-Hub-Spam-Status: No, score=-3.7
X-W3C-Hub-Spam-Report: AWL=0.735, BAYES_00=-1.9, RP_MATCHES_RCVD=-2.57, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1UXRjB-0001dW-51 7d637c44363a50b1caea92508ad7b68f
X-Original-To: ietf-http-wg@w3.org
Subject: Re: WGLC p1: proxy handling of a really bad Content-Length
Archived-At: <http://www.w3.org/mid/5180C7E1.3010509@measurement-factory.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17756
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 05/01/2013 01:26 AM, Willy Tarreau wrote:
> On Wed, May 01, 2013 at 12:43:14AM -0600, Alex Rousskov wrote:
>> Hello,
>>
>>     When talking about dealing with malformed responses, HTTPbis p1
>> Section 3.3.3 says:
>>
>>> the proxy MUST discard the received response, send a 502 (Bad
>>> Gateway) status code as its downstream response, and then close the
>>> connection.
>>
>> Which connection MUST the proxy close: upstream or downstream? If you
>> guessed downstream because the connection must be closed only _after_
>> the 502 downstream response is sent, you guessed wrong :-).
>>
>> The proxy MUST close the upstream connection and it may do that
>> immediately, without waiting for the 502 response to be sent on the
>> downstream connection. This was discussed around 2011/11/28, and I think
>> Mark agreed that a fix is needed but the text was never changed.
>>
>> Also, the current wording suggests sending "status code" as a response,
>> which is not the intent, of course.
>>
>>
>> Suggested fix:
>>
>>   the proxy MUST close the upstream connection, discard the received
>>   response, and send a 502 (Bad Gateway) response downstream.
> 
> I think we should never use the terms "upstream" and "downstream" since
> they're ambiguous due to the fact that connections are bidirectional.

HTTPbis defines those terms in p1 section 2.3, but I agree that their
use in a multiple connection context is kind of ambiguous (in both the
current text and the suggested fix).


> We'd rather use "connection to the client" and "connection to the server".
> So I would suggest :
> 
>    the proxy MUST close the connection to the server, discard the received
>    response, and send a 502 (Bad Gateway) response to the client.

Sounds great to me!


Thank you,

Alex.