Re: New Version Notification for draft-kamp-httpbis-structure-01.txt (fwd)

Kazuho Oku <> Thu, 17 November 2016 10:37 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 1E66A1294D4 for <>; Thu, 17 Nov 2016 02:37:25 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -7.998
X-Spam-Status: No, score=-7.998 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=-1.497, SPF_HELO_PASS=-0.001, SPF_PASS=-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 JwPS6NGRIiXe for <>; Thu, 17 Nov 2016 02:37:23 -0800 (PST)
Received: from ( []) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 809CC129656 for <>; Thu, 17 Nov 2016 02:37:23 -0800 (PST)
Received: from lists by with local (Exim 4.80) (envelope-from <>) id 1c7K0z-0002xU-I0 for; Thu, 17 Nov 2016 10:33:57 +0000
Resent-Date: Thu, 17 Nov 2016 10:33:57 +0000
Resent-Message-Id: <>
Received: from ([]) by with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <>) id 1c7K0u-0002vZ-5U for; Thu, 17 Nov 2016 10:33:52 +0000
Received: from ([]) by with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <>) id 1c7K0o-0002bT-40 for; Thu, 17 Nov 2016 10:33:46 +0000
Received: by with SMTP id t79so135535419wmt.0 for <>; Thu, 17 Nov 2016 02:33:25 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=qxkg4Wy82J4y0GrhqUH2WSE3r870JnPBTu8CFZue6c8=; b=bz4L1SH9r5DgDjbxgC0Z3h3rT0nyRudbFyzyar2LSmGWwRDwspNlosfNr/qL8X+W70 e0Hvfm6wpH528BSrA5l1oEH4eTZg4gLwnek6TNPcxrvPcTo+p1yoQ/TcdjTLB7ADJyo5 RRhBkGgn8OruGCEOvqLJGS4k9Eq03PxBhrgpTF7NVGElGwsC0QX2QuxZ95kJILxqaq6p EBj2xIsgBq9VN71hkFGMulPcivDqWs4QKtuzCgE0zE6fmcxrGkOpJb09U0Gbg0oCz+g9 90yjDNjm/Qhagy5G+XTOEvhvQrliR2sq14aCJdzuPrOb3LvzxomjDEY3+w6/Bky7giFu WtQA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=qxkg4Wy82J4y0GrhqUH2WSE3r870JnPBTu8CFZue6c8=; b=FmgcPuYEuBFYPN5io4iZ2o7bYL9oHpYhgdOVZTWJwPldJ3+TnwCAeK3y3DWd858QZy UZ1mAQvuqyY1f0w/q+cmpliIDv+Be3m7ilCxYrec9B3BSFeXkEZHVIljKrOECajyrZX8 6ZrSnsCSJuYMWGb1O1TRC2fRT/n6+7v4SykqE3ke4xA95Ci8nKDIagKMC0SvIJQNG0o8 FhizApByVfS+U1pHXrghFnzecXaNoVo6Nh0XswOJeBqI/r3OjmxkroIDa47mfTIRV5B+ KbUr20/9WS7EB5P5MaA0u3mIYNqjEaP7byjPgIeGpa1OnznFU0bbEx5LSFDvlouioSzc l2Rw==
X-Gm-Message-State: ABUngvetxVK4JJFYhgxEIugjS/U58zQeRJXZgTOf2Qg/UTt5TZ0c1blNUCRgBY+W4tTzmQnEx4G82VhUjPSSOQ==
X-Received: by with SMTP id w63mr16777761wmb.142.1479378799485; Thu, 17 Nov 2016 02:33:19 -0800 (PST)
MIME-Version: 1.0
Received: by with HTTP; Thu, 17 Nov 2016 02:33:18 -0800 (PST)
In-Reply-To: <>
References: <> <> <> <> <> <> <>
From: Kazuho Oku <>
Date: Thu, 17 Nov 2016 19:33:18 +0900
Message-ID: <>
To: Poul-Henning Kamp <>
Cc: Willy Tarreau <>, HTTP Working Group <>
Content-Type: text/plain; charset="UTF-8"
Received-SPF: pass client-ip=;;
X-W3C-Hub-Spam-Status: No, score=-4.3
X-W3C-Hub-Spam-Report: AWL=-0.750, 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, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: 1c7K0o-0002bT-40 6fb3b083aca749d614b18125fc081bc8
Subject: Re: New Version Notification for draft-kamp-httpbis-structure-01.txt (fwd)
Archived-At: <>
X-Mailing-List: <> archive/latest/32929
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>

2016-11-17 19:21 GMT+09:00 Poul-Henning Kamp <>:
> --------
> In message <>
> , Kazuho Oku writes:
>>For example, consider the case in which I am writing a draft that
>>passes an integer using Common Structure.
>>Since Common Structure allows an integral number to be sent with a
>>dot, a sender is permitted to send 100 as '100.00'
> So this is clearly something the draft needs to explain better.
> CS does not decide what values are legal and which are not, it only
> helps you transport values safely across the wire.
> When you define your header you define the kind of values it accepts,
> and if you say that "value X is an integer", it should be pretty
> obvious to anybody that sending it as "100.0" is not OK.
> If you think people will not get that fine detail right, you can
> add text to your header definition which drives the point home.
>>you would need to decode a floating point number even in the case
>>where you only need to deal with integers.
> So this brings up an interesting efficiency detail related to the
> HTTP1 serialization:
> You cannot tell the difference between an identifier and a number
> by looking at the data on the wire, because RFC7230::token allows
> both DIGIT, "." and "-".
> Your parser will therefore initially classify any "number" as
> "identifier", and only once your application code tells it that it
> expects an integer, will that string be interpreted as a number.
> That means that no numeric processing needs to happen until it
> is unavoidable.
> (Any design I can imagine for a future HPACK/H3 semantic compression
> will have the same property.)
> As I hint in 7.2 as "Future work", having the individual headers
> defined in a machine readble format (a "schema") would allow us to
> use programs to generate combined CS parser+validator for such a
> header.

Once we start people using CS to define new headers, I think I'd be
likely writing a parser generator handle them, regardless of whether
if a schema language is defined as a specification.

The generated parser would just deserialize the properties that the
application care of, while skipping unknown parameters.

> However, history is particularly unkind to that concept, so I
> left it in "Future work" and I think we should leave it there
> for now.
>>My understanding is that most (if not all) headers that will use
>>Common Structure would need to encode floating point numbers.
> I don't think so.
> First, just because they look like floating point numbers in the
> H1 serialization, doesn't mean you have to process them as IEEE754
> in your application.
> If I recall right, the q= weights can be processed as integer
> "milli-q", and still be compliant.  In reality comparison of q=
> weights is very often done as strings.
> Second, apart from q= and possibly future timestamps, I don't see
> much call for fractional numbers anyhow[1].
> All that said, it probably does makes good sense to have "integer"
> as a special case of "number", like "ascii_string" is a subset of
> "unicode_string", because it will make it easier for people
> to specify their HTTP headers.

Thank you for considering that. I think that would be a good move.

> Poul-Henning
> [1]  Somebody will undoubtedly use them for monetary values, but I
>      have a hard time seeing that make it into a published RFC for
>      many reasons.
> --
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> phk@FreeBSD.ORG         | TCP/IP since RFC 956
> FreeBSD committer       | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by incompetence.

Kazuho Oku