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

Ashok Kumar <ashokkumarj@gmail.com> Thu, 10 October 2019 14:07 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 E8123120099 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 10 Oct 2019 07:07:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.749
X-Spam-Level:
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: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IikO61H41VRT for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 10 Oct 2019 07:07:30 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [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 ietfa.amsl.com (Postfix) with ESMTPS id E98341200C7 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 10 Oct 2019 07:07:29 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1iIZ42-0002Fl-57 for ietf-http-wg-dist@listhub.w3.org; Thu, 10 Oct 2019 14:05:10 +0000
Resent-Date: Thu, 10 Oct 2019 14:05:10 +0000
Resent-Message-Id: <E1iIZ42-0002Fl-57@frink.w3.org>
Received: from uranus.w3.org ([128.30.52.58]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <ashokkumar.j@gmail.com>) id 1iIZ40-0002EV-5r for ietf-http-wg@listhub.w3.org; Thu, 10 Oct 2019 14:05:08 +0000
Received: from www-data by uranus.w3.org with local (Exim 4.89) (envelope-from <ashokkumar.j@gmail.com>) id 1iIZ3z-0002x0-W5 for ietf-http-wg@listhub.w3.org; Thu, 10 Oct 2019 14:05:08 +0000
Received: from titan.w3.org ([2603:400a:ffff:804:801e:34:0:4c]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <ashokkumar.j@gmail.com>) id 1iIUkb-0007KK-Mp for ietf-http-wg@listhub.w3.org; Thu, 10 Oct 2019 09:28:49 +0000
Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]) by titan.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <ashokkumar.j@gmail.com>) id 1iIUka-0003kn-6d for ietf-http-wg@w3.org; Thu, 10 Oct 2019 09:28:49 +0000
Received: by mail-qk1-x733.google.com with SMTP id w2so4974482qkf.2 for <ietf-http-wg@w3.org>; Thu, 10 Oct 2019 02:28:47 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; 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; d=1e100.net; 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: <CAOeYYRdL1zdqJry6b+YpWttXyjJFKiVALJdEqmbuUsgMD_qpqQ@mail.gmail.com>
In-Reply-To: <CAOeYYRdL1zdqJry6b+YpWttXyjJFKiVALJdEqmbuUsgMD_qpqQ@mail.gmail.com>
From: Ashok Kumar <ashokkumarj@gmail.com>
Date: Thu, 10 Oct 2019 14:58:34 +0530
Message-ID: <CAOeYYRdHfjHxr89ecT4deyncZdTRDxEH5T1W99Tb4D7Dowhwiw@mail.gmail.com>
To: ietf-http-wg@w3.org
Content-Type: multipart/alternative; boundary="0000000000004669e205948b07a4"
Received-SPF: pass client-ip=2607:f8b0:4864:20::733; envelope-from=ashokkumar.j@gmail.com; helo=mail-qk1-x733.google.com
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: titan.w3.org 1iIUka-0003kn-6d 7fa957921fde36c2d79278e714f28f64
X-caa-id: 5b73c33fad
X-Original-To: ietf-http-wg@w3.org
Subject: Re: 401 response on Expect 100 continue and re-using the connection
Archived-At: <https://www.w3.org/mid/CAOeYYRdHfjHxr89ecT4deyncZdTRDxEH5T1W99Tb4D7Dowhwiw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37045
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: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

Hi,

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).

https://tools.ietf.org/html/rfc7231#section-5.1.1


5.1.1 <https://tools.ietf.org/html/rfc7231#section-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]
<https://tools.ietf.org/html/rfc7230#section-6.6>).



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
body?


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
correct.


Thanks in advance,

Ashok