Re: Header Serialization Discussion

Frédéric Kayser <f.kayser@free.fr> Tue, 16 April 2013 02:24 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 21F9B21F9305 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 15 Apr 2013 19:24:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.052
X-Spam-Level:
X-Spam-Status: No, score=-8.052 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HELO_EQ_FR=0.35, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, MIME_QP_LONG_LINE=1.396, RCVD_IN_DNSWL_HI=-8, URI_NOVOWEL=0.5]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W-VUhqKaPRtC for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Mon, 15 Apr 2013 19:24:47 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 921E421F925A for <httpbisa-archive-bis2Juki@lists.ietf.org>; Mon, 15 Apr 2013 19:24:47 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1URvZ7-0004hu-IT for ietf-http-wg-dist@listhub.w3.org; Tue, 16 Apr 2013 02:24:13 +0000
Resent-Date: Tue, 16 Apr 2013 02:24:13 +0000
Resent-Message-Id: <E1URvZ7-0004hu-IT@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <f.kayser@free.fr>) id 1URvZ4-0004hF-DK for ietf-http-wg@listhub.w3.org; Tue, 16 Apr 2013 02:24:10 +0000
Received: from smtp5-g21.free.fr ([212.27.42.5]) by maggie.w3.org with esmtp (Exim 4.72) (envelope-from <f.kayser@free.fr>) id 1URvZ2-0002tv-Om for ietf-http-wg@w3.org; Tue, 16 Apr 2013 02:24:10 +0000
Received: from [192.168.0.1] (unknown [81.56.127.176]) by smtp5-g21.free.fr (Postfix) with ESMTP id 64D1CD4808E for <ietf-http-wg@w3.org>; Tue, 16 Apr 2013 04:23:42 +0200 (CEST)
From: Frédéric Kayser <f.kayser@free.fr>
Mime-Version: 1.0 (Apple Message framework v1085)
Content-Type: multipart/alternative; boundary="Apple-Mail-1--922718268"
Date: Tue, 16 Apr 2013 04:23:41 +0200
In-Reply-To: <CABP7RbfUH=U0hjcmEXKO1jJzy7pPffqFDE4TmAs-ahBX04qwJw@mail.gmail.com>
To: ietf-http-wg@w3.org
References: <CABP7RbfUH=U0hjcmEXKO1jJzy7pPffqFDE4TmAs-ahBX04qwJw@mail.gmail.com>
Message-Id: <24370F45-C4B4-41A2-8515-5B239766A943@free.fr>
X-Mailer: Apple Mail (2.1085)
Received-SPF: none client-ip=212.27.42.5; envelope-from=f.kayser@free.fr; helo=smtp5-g21.free.fr
X-W3C-Hub-Spam-Status: No, score=-4.1
X-W3C-Hub-Spam-Report: AWL=-2.718, BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, MIME_QP_LONG_LINE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, URI_NOVOWEL=0.5
X-W3C-Scan-Sig: maggie.w3.org 1URvZ2-0002tv-Om 14962bec68a1f0720d23eb07cc58b3d9
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Header Serialization Discussion
Archived-At: <http://www.w3.org/mid/24370F45-C4B4-41A2-8515-5B239766A943@free.fr>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17246
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>

Hello,
If text fields can effectively be encoded as UTF-8 would it be wise to use it to send IRIs (RFC3987)?
without punycode:
http://xn--acadmie-franaise-npb1a.fr/ vs. http://académie-française.fr/
http://www.xn--cigacz-2ib.pl/ vs. http://www.ścigacz.pl/
http://xn--rlcuo9h.xn--wkc4axeaevb3oqbg.xn--xkc2al3hye2a/ vs. http://தளம்.ஆள்களமையம்.இலங்கை/
http://xn--mgbggrfi2ikdb7d.xn--mgberp4a5d4ar/ vs. http://مركزالتسجيل.السعودية/

and without percent encoding:
zdj%C4%99cia vs. zdjęcia
g%C3%B6r%C3%BCnt%C3%BC vs. görüntü

I wouldn't mind if HTTP/2 clearly took the bull by the horns regarding I18N.

The easiest way to (re)encode UTF-8 using variable code length would be to collect/define statistics only for the leading octet and store the continuation octets as fixed 6-bit values (since they are restricted to the 80-BF range, 64 values).

-- 
Frédéric Kayser

James M Snell wrote :

> Text can be either UTF-8 or ISO-8859-1, indicated by a single bit flag
> following the type code. All text strings are prefixed by it's length
> given as an unsigned variant length integer
> 
[snip]
> 
> For ISO-8859-1 Text, the Static Huffman Code used by Delta would be
> used for the value. If we can develop an approach to effectively
> handling Huffman coding for arbitrary UTF-8, then we can apply Huffman
> coding to that as well.