Re: Roman Danyliw's Discuss on draft-ietf-httpbis-header-structure-18: (with DISCUSS and COMMENT)

Mark Nottingham <mnot@mnot.net> Thu, 21 May 2020 03:06 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 D7AE93A0A13 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 20 May 2020 20:06:09 -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.249, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=mnot.net header.b=d5r+5QWy; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=Kf27cH6d
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 eWrTOCHSZpYw for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 20 May 2020 20:06:07 -0700 (PDT)
Received: from lyra.w3.org (lyra.w3.org [128.30.52.18]) (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 E59F53A0A11 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 20 May 2020 20:06:06 -0700 (PDT)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1jbbWf-00011Z-6X for ietf-http-wg-dist@listhub.w3.org; Thu, 21 May 2020 03:05:41 +0000
Resent-Date: Thu, 21 May 2020 03:05:41 +0000
Resent-Message-Id: <E1jbbWf-00011Z-6X@lyra.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by lyra.w3.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <mnot@mnot.net>) id 1jbbWe-00010o-82 for ietf-http-wg@listhub.w3.org; Thu, 21 May 2020 03:05:40 +0000
Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <mnot@mnot.net>) id 1jbbWc-0002JK-CO for ietf-http-wg@w3.org; Thu, 21 May 2020 03:05:40 +0000
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 397F4FBC; Wed, 20 May 2020 23:05:21 -0400 (EDT)
Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 20 May 2020 23:05:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnot.net; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm2; bh=M SO54aLUNWJQWWhYSMfx6J75rc8s010KOAKIYIOxyQA=; b=d5r+5QWyjeW3bbBCn k7nbjj0kATZx09wTe31dfi80DhwEu+OyUANtJV0FYRdl7lN/y2dDtolVAuswBxd/ 1YTGjZoGtEGhnyJ2LVcWwzrqGTQAuhi6mhjb09GyV4jxwfVLg2RT9ViOGh8AHH6V TncfCzU1J0d9LJmr31rUZ+S7XC4kNjkcRSQ9GWCnOrlXriXK4FFhvnrM3m7MqQRw fMMUXCBWWKxFC294b/qCnJCiGaWtUhIu5dCVD8Sv0S2I9pJr2syYak8GlV2SEJR/ nD+fJfsa0R6tTpJFnOI7Pyb3/8Q9aRuHPS8HtdMOD8tAD5s+FjliX2vC6UGO+xOP sv1Eg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=MSO54aLUNWJQWWhYSMfx6J75rc8s010KOAKIYIOxy QA=; b=Kf27cH6dY5+IJ2eTkLahy4yEkfYzbf/fHtctdE8pB69X08w4iRS/AFmVA 7RxMLZ8NsuK6EMidJCsiZBOEpzqC7fuUSQgg/Ct5Y6PFI0aPz3QnxUEvUUy+B9vj 5ESJR4Itr6YNXtf8ZI5l0/Zopk6DsDAfJrj8m6L8N/3jcBp2Tsa0WPY/g50fazpZ dGE2NhIhcc01EV1SNFzamUi5Vc7BwGUmi4HCJmA5gPg4XIA3+Aryv0+EFLfeJKzb Vm03QARVBVGNq9CgOxZe5HaFSOytFmMdcHK/qpC37WhVQh4lU5FeY1wMMxarve5H /OqRrddArHnXaKTqWvfCouxKPmJXw==
X-ME-Sender: <xms:7-_FXmRqx5LXWbWg9g_yXl-lckf4I03rD9Hu3tD8OhQjxzvM_oOyWQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddutddgieehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurheptggguffhjgffgffkfhfvofesthhqmhdthhdtjeenucfhrhhomhepofgrrhhk ucfpohhtthhinhhghhgrmhcuoehmnhhothesmhhnohhtrdhnvghtqeenucggtffrrghtth gvrhhnpeetfeelffejfffhheehfeefgedulefgueejudekieegvdeghefffedvheffieel keenucffohhmrghinhepmhhnohhtrdhnvghtnecukfhppeduudelrddujedrudehkedrvd ehudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehm nhhothesmhhnohhtrdhnvght
X-ME-Proxy: <xmx:7-_FXrxApLw3iP4c2i7G6gZoCY88n0TMl5NfYSAJulH1DdLoerDvJg> <xmx:7-_FXj3QyJCr2sah0Gy84dZNFSIo-7Ihrjt07K-fYU6wECC2PY3gmQ> <xmx:7-_FXiDktjNJQ1OVbVV-h_AJL7aKD_6KACrO2Mto8PqAT4q7gpZqwg> <xmx:8O_FXlYb818Wg8Hy7xVO26Xs6i9CUJtAIyD-M1Ab2_o1laJdq5iBTg>
Received: from macbook-air.mnot.net (119-17-158-251.77119e.mel.static.aussiebb.net [119.17.158.251]) by mail.messagingengine.com (Postfix) with ESMTPA id DC4D2306640A; Wed, 20 May 2020 23:05:17 -0400 (EDT)
Content-Type: text/plain; charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <159000658355.8322.2397398340757603474@ietfa.amsl.com>
Date: Thu, 21 May 2020 13:05:14 +1000
Cc: The IESG <iesg@ietf.org>, draft-ietf-httpbis-header-structure@ietf.org, httpbis-chairs@ietf.org, ietf-http-wg@w3.org, Tommy Pauly <tpauly@apple.com>
Content-Transfer-Encoding: quoted-printable
Message-Id: <50135FBB-47A3-4C0F-975A-4B708E5087A9@mnot.net>
References: <159000658355.8322.2397398340757603474@ietfa.amsl.com>
To: Roman Danyliw <rdd@cert.org>
X-Mailer: Apple Mail (2.3608.80.23.2.2)
Received-SPF: pass client-ip=64.147.123.25; envelope-from=mnot@mnot.net; helo=wout2-smtp.messagingengine.com
X-W3C-Hub-Spam-Status: No, score=-9.8
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, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1jbbWc-0002JK-CO 6800b62b6625f113399919710a9b2f7d
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Roman Danyliw's Discuss on draft-ietf-httpbis-header-structure-18: (with DISCUSS and COMMENT)
Archived-At: <https://www.w3.org/mid/50135FBB-47A3-4C0F-975A-4B708E5087A9@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37693
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 Roman,

Thanks for the review. Responses below.

> On 21 May 2020, at 6:29 am, Roman Danyliw via Datatracker <noreply@ietf.org> wrote:

> ----------------------------------------------------------------------
> DISCUSS:
> ----------------------------------------------------------------------
> 
> (I appreciate that this is pseudo-code which has inherent ambiguity sometimes,
> so please let me know if I've interpreted it in an unintended way)
> 
> ** Section 4.2.6.  There appears to be an inconsistency here in my reading of
> the algorithm given the ABNF in Section 3.3.4
> 
> -- Let’s assume of token of input_string =“*foo”
> 
> -- Step 1: pass since input_string[0] = “*”
> 
> -- Step 2: Set output_string = “”
> 
> -- Step 3: pass since input_string[0] = “*”,
> 
> -- Step 3.1: input_string[0] is still “*” and not a tchar, “:” or “/” causing a
> output_string=”” to be returned
> 
> This doesn’t seem correct.

As Matthew points out, tchar contains "*".

> ** Section 4.2.7.  The parsing guidance doesn’t follow for me given the ABNF in
> Section 3.3.5.
> 
> -- Let’s assume input_string =
> “:cHJldGVuZCB0aGlzIGlzIGJpbmFyeSBjb250ZW50Lg==:”, the example in Section 3.3.5
> 
> -- Step 1: pass since input_string[0] = “:”
> 
> -- Step 2: Set input_string = “cHJldGVuZCB0aGlzIGlzIGJpbmFyeSBjb250ZW50Lg==:”
> 
> -- Step 3: pass since the last character of input_string is “:”
> 
> -- Step 4: Set b64_content = “cHJldGVuZCB0aGlzIGlzIGJpbmFyeSBjb250ZW50Lg==”
> 
> -- Step 5 says “consume the “:” character at the beginning of the input_string,
> but there is no such character.  It was discarded in Step 2.

As Matthew points out, we're now at the end of the data type, this is the final ":".

> ----------------------------------------------------------------------
> COMMENT:
> ----------------------------------------------------------------------
> 
> ** Section 4.1. Reading steps 1 – 6 like pseudo-code, if Step 1 is true,
> output_string will be undefined in Step 6.    There needs to be a step 0 which
> reads “Let output_string be an empty string” or Step 1 needs to explicitly
> initialize output_string.

Step one being true effectively triggers an exception -- "do not serialise the field at all." 

> ** Section 4.1.8.  Per Step 1, “If input_bytes is not a sequence of bytes, fail
> serialization”, what input wouldn’t be considered as sequence of bytes?

Besides Matthew's comment, it depends on the type system in use by the implementation; many have a dedicated way to indicate binary content.

> ** Section 4.2.  An algorithmic style nit.  In Section 4.1, the text used an
> “IF x ELSE IF y ELSE IF z ELSE fail” convention.  Here the text is a series of
> simple “IF x; IF y; IF z; …” statements.

The 'else's are necessary in 4.1 to group step 5 with steps 2-4 as  a set of alternatives. It's not necessary in 4.2 (or in many other places), so we don't use it.

> ** Section 4.2.  Editorial.  In step 8, s/Otherwise, return output./Else,
> return output./

We use "otherwise..." in many places.

Cheers,

--
Mark Nottingham   https://www.mnot.net/