Re: Delta Compression and UTF-8 Header Values

Willy Tarreau <w@1wt.eu> Sat, 09 February 2013 15:06 UTC

Return-Path: <ietf-http-wg-request@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 418D021F88B2 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 9 Feb 2013 07:06:59 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.319
X-Spam-Level:
X-Spam-Status: No, score=-10.319 tagged_above=-999 required=5 tests=[AWL=0.128, BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8, SARE_SUB_ENC_UTF8=0.152]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id QAuxVc2i2t1Y for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 9 Feb 2013 07:06:58 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 9675E21F88A6 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sat, 9 Feb 2013 07:06:58 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1U4C02-0003fE-Ei for ietf-http-wg-dist@listhub.w3.org; Sat, 09 Feb 2013 15:05:54 +0000
Resent-Date: Sat, 09 Feb 2013 15:05:54 +0000
Resent-Message-Id: <E1U4C02-0003fE-Ei@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <w@1wt.eu>) id 1U4Bzw-0003eZ-IT for ietf-http-wg@listhub.w3.org; Sat, 09 Feb 2013 15:05:48 +0000
Received: from 1wt.eu ([62.212.114.60]) by lisa.w3.org with esmtp (Exim 4.72) (envelope-from <w@1wt.eu>) id 1U4Bzu-0007LN-AR for ietf-http-wg@w3.org; Sat, 09 Feb 2013 15:05:48 +0000
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id r19F5DGW009421; Sat, 9 Feb 2013 16:05:13 +0100
Date: Sat, 09 Feb 2013 16:05:13 +0100
From: Willy Tarreau <w@1wt.eu>
To: Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc: "Martin J. Dürst" <duerst@it.aoyama.ac.jp>, Mark Nottingham <mnot@mnot.net>, James M Snell <jasnell@gmail.com>, "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Message-ID: <20130209150513.GC8712@1wt.eu>
References: <CABP7RbfRLXPpL4=wip=FvqD3DM7BM8PXi7uRswHAusXUmPO_xw@mail.gmail.com> <CE65E38D-A482-4EA9-BAF4-F6498F643A78@mnot.net> <511642E9.9010607@it.aoyama.ac.jp> <20130209133341.GA8712@1wt.eu> <62760.1360418670@critter.freebsd.dk>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <62760.1360418670@critter.freebsd.dk>
User-Agent: Mutt/1.4.2.3i
Received-SPF: pass client-ip=62.212.114.60; envelope-from=w@1wt.eu; helo=1wt.eu
X-W3C-Hub-Spam-Status: No, score=-4.0
X-W3C-Hub-Spam-Report: AWL=-2.052, BAYES_00=-1.9, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1U4Bzu-0007LN-AR 816d28f695ab6fde9f990c7b3ff21be2
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Delta Compression and UTF-8 Header Values
Archived-At: <http://www.w3.org/mid/20130209150513.GC8712@1wt.eu>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/16487
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>

On Sat, Feb 09, 2013 at 02:04:30PM +0000, Poul-Henning Kamp wrote:
> Content-Type: text/plain; charset=ISO-8859-1
> --------
> In message <20130209133341.GA8712@1wt.eu>, Willy Tarreau writes:
> 
> >I'm not saying I'm totally against UTF-8 in HTTP/2 [...]
> 
> What and where do you mean when you say "UTF-8" In HTTP/2 ?
> 
> I think we need to be more precise, to avoid misunderstandings.
> 
> In HTTP/1, there is a peculiar mix between protocol-mechanics, and
> metadata:  If I add a custom bit of metadata, it must follow certain
> rules, since otherwise it will break the protocol mechanics.
> 
> For instance, I cannot define a custom header called:
> 
> 	 "FOO" CRNL CRNL ": " [8 zero bytes]
> 
> If we define HTTP/2 as a "binary" protocol in some sensible way,
> this restriction could go away, and we'd just move something like:
> 
> 	<HDR nlen=7,blen=8> "FOO" CRNL CRNL \0\0\0\0\0\0\0\0
> 
> down the wire, and not care about what it is, what it means or
> what character set, if any, it is encoded in.
> 
> It is only the metadata that needs inspection along the way where
> we need to decide about UTF-8, and it really isn't that much.

Prefixing values with their lengths generally is the most efficient
way to work (CPU-wise).

> Host:
> 	Why would we care about the character set ?  We're
> 	just going to pass it to DNS anyway.
> 
> URI:
> 	At least the query strings, possibly all of it ?
> 	But do we really care ?  Provided we take the Host
> 	part out, as proposed, we treat this as a unit.

I'd be cautious about mixing URI and query strings, I see too often
people rewrite some requests to move the question mark away and
replace it with a slash. Then they don't realize they're possibly
mixing two distinct encodings, still they do!

> Cache-Control:
> 	And what good would UTF-8 do here in the first place ?

No need, we need to use tokens here and tokens can be an enum.

> So where is it you want UTF-8, and what difference will it make ?

Hey Poul-Henning, please do not put words in my mouth, I'm not
saying I want UTF-8, OK ? As I said, I don't like this encoding at
all. What I'm saying is that if we have to transport such encoded
data, I prefer that we pass it as-is in its original form than having
to decode/encode it. For example, if it becomes a norm that URI,
Location or Referer is UTF8-encoded, let's pass them untransformed.

But in general, I think that 20 years of web have shown that the
protocol does not need this at all to succeed.

Regards,
Willy