Re: 103 (Early Hints) vs. response headers

Kazuho Oku <kazuhooku@gmail.com> Fri, 24 February 2017 01:38 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 C77D312943E for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 23 Feb 2017 17:38:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.502
X-Spam-Level:
X-Spam-Status: No, score=-6.502 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.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-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 gRFYnpKCtJEY for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 23 Feb 2017 17:38:01 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 68E9D1293F2 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 23 Feb 2017 17:38:01 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ch4mX-00027s-4N for ietf-http-wg-dist@listhub.w3.org; Fri, 24 Feb 2017 01:34:49 +0000
Resent-Date: Fri, 24 Feb 2017 01:34:49 +0000
Resent-Message-Id: <E1ch4mX-00027s-4N@frink.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <kazuhooku@gmail.com>) id 1ch4mO-000277-Do for ietf-http-wg@listhub.w3.org; Fri, 24 Feb 2017 01:34:40 +0000
Received: from mail-ot0-f174.google.com ([74.125.82.174]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <kazuhooku@gmail.com>) id 1ch4mI-0004Xp-1u for ietf-http-wg@w3.org; Fri, 24 Feb 2017 01:34:35 +0000
Received: by mail-ot0-f174.google.com with SMTP id w44so5929419otw.2 for <ietf-http-wg@w3.org>; Thu, 23 Feb 2017 17:34:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=vwOi7kONufv+jeC6XMn//ERsnVBIbe8uwhGHhT2pca4=; b=oQ32dHuAnOXrGZIOSHYRNdB/VFOmggvZ5+Exp/ZIzM8YahQmRjhznKrsvDVq5g1Ugq Xmh2SNAr6jnrzB5RkTXYTHwyh1IABC+JBxb+FLTddhpXXH0yOTNnPE/mSQY2zDYsxGdc pI7oxcJ9bxBWHYfhWk64KnYRKK0f6rbPxrqxJFdnYQ8EJxYVEoZVvsrNSv3NMDjXGqAo UcbTt55RhIjVm1Lpv9LbOtn0Hn8lV38rCVl+nE+1tyqZOulqK2K+Ov14yi6fRFa/vdaS c2YwwX5NdDAFx6Pk5ox65SpeIHrQ9w/zb7s616VJ0L9fKuVmx9oRV6k5bWsfGFrQvg00 Ctgw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=vwOi7kONufv+jeC6XMn//ERsnVBIbe8uwhGHhT2pca4=; b=CpPMM1goB39oKItOMveLdLufZvcsI7e1pAzn8kuXL5V7Yiwr+4Zkp9L8VmhGfxc8kU uuH+xAisgUha4Evv+LPg9WymqE3wLgybSUS/+uytFxWrWV8jVgJVCZI4Dvf4G8Ks5ETW fevkHyS626dxi7qcznzfMIiWJXxLVXQJmMK0ypyDmOJFIXmoPEYDKxM1nfaN1nkgfdKV yLF6XhDYK8hzlqpAM4TcrlYHoRcgD7fhBIhewK9U/3b3sJVRHAwITiFu2tfpOYxzwWCG ayMwM9PJbf5ENFQhMzw54VWlwDoDKb9/9VFtmHmax14uHAnejp1AlpP08qPgOJZNuw+H cgpQ==
X-Gm-Message-State: AMke39n7E+PuUUcXK3m4y7QuAwEi9ECXN388EoQOttS8tI0qFKLCXmGo5VPmGhVhEO5Xt5XFh2z8qqHT2rB/CQ==
X-Received: by 10.157.51.155 with SMTP id u27mr118727otc.232.1487900047168; Thu, 23 Feb 2017 17:34:07 -0800 (PST)
MIME-Version: 1.0
Received: by 10.157.27.72 with HTTP; Thu, 23 Feb 2017 17:34:06 -0800 (PST)
In-Reply-To: <CALHHdhwQBfBN0Xz-4kxRJrJekiCLnro1i-MVw954wTRyOWAtvw@mail.gmail.com>
References: <CALHHdhwQBfBN0Xz-4kxRJrJekiCLnro1i-MVw954wTRyOWAtvw@mail.gmail.com>
From: Kazuho Oku <kazuhooku@gmail.com>
Date: Fri, 24 Feb 2017 10:34:06 +0900
Message-ID: <CANatvzzDOPwmQhouX4LqVM8ALecwQ1So0B_uZSOKO2=OojwLaA@mail.gmail.com>
To: Vasiliy Faronov <vfaronov@gmail.com>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=74.125.82.174; envelope-from=kazuhooku@gmail.com; helo=mail-ot0-f174.google.com
X-W3C-Hub-Spam-Status: No, score=-4.2
X-W3C-Hub-Spam-Report: AWL=-0.700, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1ch4mI-0004Xp-1u d258fc48d3a363f93446bb8576d36523
X-Original-To: ietf-http-wg@w3.org
Subject: Re: 103 (Early Hints) vs. response headers
Archived-At: <http://www.w3.org/mid/CANatvzzDOPwmQhouX4LqVM8ALecwQ1So0B_uZSOKO2=OojwLaA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33609
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>

Hi,

Thank you for raising the issue.

2017-02-24 0:27 GMT+09:00 Vasiliy Faronov <vfaronov@gmail.com>:
> Hi Kazuho, all,
>
> I have a question about the 103 (Early Hints) draft [1]. It says:
>
>> A client MAY speculatively evaluate the headers included in the
>> informational response while waiting for the final response.  For
>> example, a client may recognize the link header of type preload and
>> start fetching the resource.  However, the evaluation MUST NOT affect
>> how the final response is processed; the client must behave as if it
>> had not seen the informational response.
>
> It's clear how this should work for rel=preload.
>
> It's also clear how this should work for representation metadata [2],
> although I think it's worth calling out explicitly in the spec that
> such metadata on a 103 response applies (speculatively) to whichever
> representation is associated with the final response.
>
> But how should this work in general for headers that apply to
> individual responses?

I think that the headers included in an 103 response should be
considered as what are likely to be included in the final response.

My intention as the author has been to state that in the draft in the
first sentence of the draft, as quoted below.

   This informational status code indicates the client that the server
   is likely to send a final request with the headers included in the
   informational response.

I think that you might have missed this point. Or we might need to
rephrase this to make it clearer (assuming that we agree on how the
103 headers should be processed).

> I don't have a convincing real-world example, but let's take the
> Warning header [3], which can be applied to any message. According to
> the spec, clients SHOULD display or log warnings, and I think there
> are clients that do. Suppose such a client receives:
>
>     HTTP/1.1 103 Early Hints
>     Link: </another-resource>; rel=preload
>     Warning: 299 - "something is not quite right"
>
>     HTTP/1.1 200 OK
>     Date: Thu, 23 Feb 2017 16:49:43 GMT
>     Content-Type: text/html
>     Link: </another-resource>; rel=preload
>     Connection: close
>
>     ...text goes here...
>
> Should it log/display the warning (as applied to the 103 response), or
> discard it (as missing from the 200 response)?

I think that the client should discard it, because (contrary to the
expectation) the server did not include the Warning header in the
final response, and because the draft states that:

   However, the evaluation MUST NOT affect
   how the final response is processed; the client must behave as if it
   had not seen the informational response.

>
> Should the spec for 103 be more explicit about this?
>
> Thank you.
>
>
> [1] https://tools.ietf.org/html/draft-ietf-httpbis-early-hints-00
> [2] https://tools.ietf.org/html/rfc7231#section-3.1
> [3] https://tools.ietf.org/html/rfc7234#section-5.5
>
>
> --
> Vasiliy



-- 
Kazuho Oku