Re: draft-ietf-httpbis-header-structure-15.txt, 4.1.6. Serializing a String

Mark Nottingham <mnot@mnot.net> Tue, 18 February 2020 04:56 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 1BEC31200A3 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 17 Feb 2020 20:56:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.75
X-Spam-Level:
X-Spam-Status: No, score=-2.75 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, 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=mnot.net header.b=IfQsQ+lo; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=2g5RSJ13
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 9vy_ORwwAgW5 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 17 Feb 2020 20:56:24 -0800 (PST)
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 047C6120074 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 17 Feb 2020 20:56:24 -0800 (PST)
Received: from lists by lyra.w3.org with local (Exim 4.92) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1j3usy-0005vT-DR for ietf-http-wg-dist@listhub.w3.org; Tue, 18 Feb 2020 04:53:28 +0000
Resent-Date: Tue, 18 Feb 2020 04:53:28 +0000
Resent-Message-Id: <E1j3usy-0005vT-DR@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 1j3uss-0005uh-7U for ietf-http-wg@listhub.w3.org; Tue, 18 Feb 2020 04:53:22 +0000
Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <mnot@mnot.net>) id 1j3usq-0001KO-4B for ietf-http-wg@w3.org; Tue, 18 Feb 2020 04:53:22 +0000
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 101056A3; Mon, 17 Feb 2020 23:53:06 -0500 (EST)
Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 17 Feb 2020 23:53:06 -0500
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=x 7Pp1g+xIuMxuSnVRZ3N5X/zeoOUZYTPfWDkcSAJ6Jg=; b=IfQsQ+loOfOHSwLhe bNfJwwW38nOKTYekg7sz0BMZlta39gVce3+hIrTYhaQUdjlkmZC6Dy2JjpKBhMNc FII7eeBe5lnCNq7GPjwxKLXGzpxZWpnwBr3RZfs6rg78iU54vOzF656Sl8kAlegy yMZo1sFeJoCpXvbFHC5BbAhSenZSWCjEGYtEHi2h6v1eeTuo36MbTOkdfehgEd/9 B/t7eYp9M+x9zRHkYvclsGbw6tyH2sHqGDqprgk8NTF0qgzKClt44NVmKII02t7Y xuwRUUBHvYVOJLfjOSdUMJKPunqRt/J00K2S2W67FCX2S5qyGLJ+0+IAq5QWJ3QE F7byg==
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=x7Pp1g+xIuMxuSnVRZ3N5X/zeoOUZYTPfWDkcSAJ6 Jg=; b=2g5RSJ13WhYhP4rW5BKwYISX0yXfrvDS3rHhEe6RR2a7MlZoCxgQmGiLB ZCv6P9BoWWWbLc5g3UUYCiMutaPoxkOdETH3Bbou625Z5MpAstUTOwBrrAEkREzu BFTUbEo0b9zWiNvTcoeKD7wNv7B15Go5NgoJ4P0pH4fklNB4T2E1UI57SuarXzcE hO9Cq9b9eLA+tuaMbZd50xFt3uiAMSmAxpJHJgkoGiZozK0MtBCspFJ1PVXJT/Eh HGaUO00bNTK5UNZODCUjThzoi7pLrHE7XCipdwR13JJeosEkcJ9DN+GJ/RnlOf2y 2QMl22sM3qIs0IejGYJJvzxD6HFxA==
X-ME-Sender: <xms:sG1LXsfNvOhHN0EdHJrnc6Y67nlvqCp64lHCu121I8t33NkcGA7Y3w>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrjeejgdejhecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtddvnecuhfhrohhmpeforghrkhcu pfhothhtihhnghhhrghmuceomhhnohhtsehmnhhothdrnhgvtheqnecuffhomhgrihhnpe hivghtfhdrohhrghdphhhtthhpfihgrdhorhhgpdhmnhhothdrnhgvthenucfkphepuddu ledrudejrdduheekrddvhedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepmhhnohhtsehmnhhothdrnhgvth
X-ME-Proxy: <xmx:sG1LXn2fmsSoaQLNqil389YUgJmW42n8qX4C07cabai9nrgJ1iIhSQ> <xmx:sG1LXqMJIJ7DrRCxGesEFfrlYHf3TNUakaThHSmgdGCTWbTDiwcSgw> <xmx:sG1LXjdMwZsYgFcRtoGXL0zOVBG_2FKTg2SGyCEG-MDN7I8xCBD5eQ> <xmx:sW1LXnQFfo6zWDWhj7W9xgDLvLfiJILsOP8qFf42kOklxufoKlGDAQ>
Received: from macbook-pro.mnot.net (unknown [119.17.158.251]) by mail.messagingengine.com (Postfix) with ESMTPA id 5B7DA328005A; Mon, 17 Feb 2020 23:53:03 -0500 (EST)
Content-Type: text/plain; charset="us-ascii"
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <20200216173823.C7E9B45BF3@welho-filter4.welho.com>
Date: Tue, 18 Feb 2020 15:53:00 +1100
Cc: HTTP Working Group <ietf-http-wg@w3.org>, Poul-Henning Kamp <phk@varnish-cache.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <952D5261-26B7-419E-8987-FA10125C63A4@mnot.net>
References: <158028031175.4610.9085377324549619919@ietfa.amsl.com> <20200216173823.C7E9B45BF3@welho-filter4.welho.com>
To: Kari Hurtta <hurtta-ietf@elmme-mailer.org>
X-Mailer: Apple Mail (2.3608.60.0.2.5)
Received-SPF: pass client-ip=64.147.123.20; envelope-from=mnot@mnot.net; helo=wout4-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, 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 1j3usq-0001KO-4B 215cec4fff50f5966bfc614498d14359
X-Original-To: ietf-http-wg@w3.org
Subject: Re: draft-ietf-httpbis-header-structure-15.txt, 4.1.6. Serializing a String
Archived-At: <https://www.w3.org/mid/952D5261-26B7-419E-8987-FA10125C63A4@mnot.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/37360
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 Kari,

> On 17 Feb 2020, at 4:38 am, Kari Hurtta <hurtta-ietf@elmme-mailer.org> wrote:
> 
> 4.1.6.  Serializing a String
> https://tools.ietf.org/html/draft-ietf-httpbis-header-structure-15#section-4.1.6
> 	
> 
> Output is restricted ASCII, but this alogrithm seems not say that
> input_string is limited to ASCII
> 
> |   Given a string as input_string, return an ASCII string suitable for
> |   use in a HTTP header value.
> |
> |   1.  If input_string is not a sequence of characters, or contains
> |       characters in the range %x00-1f or %x7f (i.e., is not in VCHAR or
> |       SP), fail serialisation.
> 
> In other words, should this fail serialization if input_string is not
> ASCII string ?

That's one of the effects of this step, yes. See the definition of the string data type at:
  https://httpwg.org/http-extensions/draft-ietf-httpbis-header-structure.html#string


> Now failing is implicit, because there is just
> 
> |       2.  Append char to output.
> 
> And if char is not ASCII then "return an ASCII string" part
> is violated.
> 
> / Kari Hurtta
> 

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