Re: 401 response on Expect 100 continue and re-using the connection

Ashok Kumar <> Thu, 10 October 2019 14:07 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id E8123120099 for <>; Thu, 10 Oct 2019 07:07:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.749
X-Spam-Status: No, score=-2.749 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=pass (2048-bit key)
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id IikO61H41VRT for <>; Thu, 10 Oct 2019 07:07:30 -0700 (PDT)
Received: from ( [IPv6:2603:400a:ffff:804:801e:34:0:38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id E98341200C7 for <>; Thu, 10 Oct 2019 07:07:29 -0700 (PDT)
Received: from lists by with local (Exim 4.89) (envelope-from <>) id 1iIZ42-0002Fl-57 for; Thu, 10 Oct 2019 14:05:10 +0000
Resent-Date: Thu, 10 Oct 2019 14:05:10 +0000
Resent-Message-Id: <>
Received: from ([]) by with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <>) id 1iIZ40-0002EV-5r for; Thu, 10 Oct 2019 14:05:08 +0000
Received: from www-data by with local (Exim 4.89) (envelope-from <>) id 1iIZ3z-0002x0-W5 for; Thu, 10 Oct 2019 14:05:08 +0000
Received: from ([2603:400a:ffff:804:801e:34:0:4c]) by with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <>) id 1iIUkb-0007KK-Mp for; Thu, 10 Oct 2019 09:28:49 +0000
Received: from ([2607:f8b0:4864:20::733]) by with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <>) id 1iIUka-0003kn-6d for; Thu, 10 Oct 2019 09:28:49 +0000
Received: by with SMTP id w2so4974482qkf.2 for <>; Thu, 10 Oct 2019 02:28:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Iw7E+Zv9hclOgcUmciK/fWOz0RRrKHhNvk8DuBj4wNQ=; b=eGeNahGmZzpuhO8W7Jucc5I2xh4NpLkXYu80kPYrbmFh8gFixz2afqWvZr+he84alS ZCWeKba36cn7YDcbL3FqO6zZiJzV/Ngr96pcnwL5gCQdqxa7/d2LuF8s4s8tcufOgQp5 20JqMOx+UZtfL26ifUWxIKXFe5xygW/Tfg30wP2ZGey6gOTxg0RgIHvVN5fZCuLKkseP AufWMydwiwc0Ro8zrM6INFACeBRZCvWKlUrzApPeZqCv33OVyMDmdTdMojKNS8SicWm0 3b+OBFhgiQw+SgVCw0vhQ6/Zfua/Vwi0VV+ljLZ5sw5ZCMOV5FnWRPH+q6be+AVey5To gwUg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Iw7E+Zv9hclOgcUmciK/fWOz0RRrKHhNvk8DuBj4wNQ=; b=EHgSuPLHEUhpLN4JSKZJAHWsfIKmb/UdZQm/hkG5i6B+GP6m7n1KchTz1IWXxd5YzJ 49xbsJERQup5QazJoT5wvG1V7Wb2zf2Vo1+nh+PBwXp778YVBONlpkedZvZdXcLpq+Za hez6pimV7jKjVYgld+xb4rFR09DBmj9hpoNptNf/abH5ay6tQaZmB7XbnrAsV2puY7nz wQ/DBrBnuJ4uKLbdm2EDIxYoptQqU7i0C5tr9C8idSmNf+Pr368VwWcQilH9hOqdsaq9 vJqzXdueJULS3Zs2QMOXwfWqRpmK9jsoDZKwzJVs1tbsAZ9jsN3OymoL9fP6pZd4vyx3 f2+g==
X-Gm-Message-State: APjAAAXL6nVAo8bpOQFM9wA10sej35dvugmR3pcPOOAYMA5vWqyYQhhB grlBQm2LSJKMs5PFEwhu74AEuvngpXUMVmq4nO7wWQ==
X-Google-Smtp-Source: APXvYqzRrqefloHV01qCs8kfNSulO8yqJxhOOUX3VJQDUNgVtyWYu1pn12X14igQlxstl+j89dkjnJR4WLQxcpUmsOU=
X-Received: by 2002:a05:620a:218b:: with SMTP id g11mr8615958qka.260.1570699726971; Thu, 10 Oct 2019 02:28:46 -0700 (PDT)
MIME-Version: 1.0
References: <>
In-Reply-To: <>
From: Ashok Kumar <>
Date: Thu, 10 Oct 2019 14:58:34 +0530
Message-ID: <>
Content-Type: multipart/alternative; boundary="0000000000004669e205948b07a4"
Received-SPF: pass client-ip=2607:f8b0:4864:20::733;;
X-W3C-Hub-Spam-Status: No, score=-1.6
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_NW=0.5
X-W3C-Scan-Sig: 1iIUka-0003kn-6d 7fa957921fde36c2d79278e714f28f64
X-caa-id: 5b73c33fad
Subject: Re: 401 response on Expect 100 continue and re-using the connection
Archived-At: <>
X-Mailing-List: <> archive/latest/37045
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>


I'm looking for some clarity on client behavior (or what the server should
expect) in case of requests with "Expect: 100-Continue" header and final
response from server (401 in particular).

5.1.1 <>.  Expect


 o  A client that sends a 100-continue expectation is not required to
      wait for any specific length of time; such a client MAY proceed to
      send the message body even if it has not yet received a response.
      Furthermore, since 100 (Continue) responses cannot be sent through
      an HTTP/1.0 intermediary, such a client SHOULD NOT wait for an
      indefinite period before sending the message body.


o  A server that responds with a final status code before reading the
      entire message body SHOULD indicate in that response whether it
      intends to close the connection or continue reading and discarding
      the request message (see Section 6.6 of [RFC7230]

Does this imply that a client that sent "Expect: 100-continue", on
receiving a final status code like 401, without a connection close, if
it wishes to re-use the connection, MUST continue to send the response

Or put other way, Can server always assume that it will receive the
request body on connecton where it sent a 401, before receiving the
next request?

I see some clients which are behaving differently i.e. sending the
next request on receiving a 401 and I'm unable to ascertain If this is

Thanks in advance,