Re: p2: Expect: 100-continue and "final" status codes

Amos Jeffries <> Wed, 24 April 2013 06:12 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id D14DE21F8EF7 for <>; Tue, 23 Apr 2013 23:12:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -10.523
X-Spam-Status: No, score=-10.523 tagged_above=-999 required=5 tests=[AWL=0.076, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id kThjuWHYvLkR for <>; Tue, 23 Apr 2013 23:12:07 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id 1E9E621F8EF5 for <>; Tue, 23 Apr 2013 23:12:07 -0700 (PDT)
Received: from lists by with local (Exim 4.72) (envelope-from <>) id 1UUsut-0002vi-AI for; Wed, 24 Apr 2013 06:10:55 +0000
Resent-Date: Wed, 24 Apr 2013 06:10:55 +0000
Resent-Message-Id: <>
Received: from ([]) by with esmtp (Exim 4.72) (envelope-from <>) id 1UUsup-0002uu-Gp for; Wed, 24 Apr 2013 06:10:51 +0000
Received: from ([] by with esmtp (Exim 4.72) (envelope-from <>) id 1UUsuo-0002qJ-Fj for; Wed, 24 Apr 2013 06:10:51 +0000
Received: from [] ( []) by (Postfix) with ESMTP id 4D3F2E6FB8 for <>; Wed, 24 Apr 2013 18:10:26 +1200 (NZST)
Message-ID: <>
Date: Wed, 24 Apr 2013 18:10:23 +1200
From: Amos Jeffries <>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5
MIME-Version: 1.0
References: <em371a6470-eea5-4b2a-8741-d2e3c419f0ed@bombed>
In-Reply-To: <em371a6470-eea5-4b2a-8741-d2e3c419f0ed@bombed>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Received-SPF: pass client-ip=;;
X-W3C-Hub-Spam-Status: No, score=-0.0
X-W3C-Hub-Spam-Report: SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: 1UUsuo-0002qJ-Fj bb6ee412e0fe03ea634bddab09b717ef
Subject: Re: p2: Expect: 100-continue and "final" status codes
Archived-At: <>
X-Mailing-List: <> archive/latest/17522
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>

On 24/04/2013 4:39 p.m., Adrien W. de Croy wrote:
> ------ Original Message ------
> From: "Mark Nottingham" <>
>> On 24/04/2013, at 12:41 PM, Amos Jeffries <> wrote:
>>>>>  I think we can give better advice than that. If a server responds 
>>>>> with a final status code instead of 100 (Continue)
>>>>>  1. The response must be the last response on the connection. The 
>>>>> response should contain "Connection: close" header. After the 
>>>>> response is written, the server must initiate a lingering close of 
>>>>> the connection (p1#6.6).
>>>>  That seems too restrictive; as long as the server reads the rest 
>>>> of the request properly (discarding it), it should be able to 
>>>> recover and reuse the connection.
>>>  The problem comes with intermediaries. How are they to know the 
>>> bytes following were the original advertised payload or not? the 
>>> status from server has no guarantee of arriving after the client 
>>> payload starts arriving.
>>>  The only way to guarantee safety on the connection is to close it 
>>> or always send payload.
> I'm really struggling to see what benefit can be derived by a client 
> in knowing whether a server supports 100 continue or not. So to me 
> Expects: 100-continue is a complete waste of space.  I've never seen 
> one so I guess implementors by and large agree.

I guess you have never tried uploading a video to the YouTube through an 
old intermediary which requires authentication. At best (Basic) it 
doubles the upload time and can cause the whole transaction to abort 
with a timeout. At worst (NTLM) it can do the same while consuming up to 
3x the total size of the uncompressed video in bandwidth. This exact 
use-case is why we pushed HTTP/1.1 experiments into Squid-2.7.

> Regardless of 100 continue being transmitted, the client has to send 
> the payload if it wants to reuse the connection.  The only early-out 
> options involve closing the connection.

Regarding pipelining sure. The benefits come from avoiding the above 
mentioned resource waste and timeouts. Adding a whole TCP setup overhead 
and RTT (few hundred ms) is far faster and cheaper that transferring >10 
MB of data multiple times (from whole seconds to whole minutes).

> There was quite a lot of discussion about this in the past, and my 
> understanding was that 100 continue couldn't be used to negotiate 
> whether or not the payload would be sent.  The outcome of this 
> discussion was not satisfactory IMO, since the "answer" was for the 
> client to send request bodies always chunked, and send a 0 chunk if it 
> needed to abort early.

Agred. I too am unhappy with that. It does work however.