Re: If not JSON, what then ?

nicolas.mailhot@laposte.net Tue, 02 August 2016 12:45 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 8601812D5A2 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 2 Aug 2016 05:45:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.308
X-Spam-Level:
X-Spam-Status: No, score=-8.308 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_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.287, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=laposte.net
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 Db_AHQeTB7Jp for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 2 Aug 2016 05:45:44 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4A74012D596 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 2 Aug 2016 05:45:44 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1bUZ2W-0005qr-On for ietf-http-wg-dist@listhub.w3.org; Tue, 02 Aug 2016 12:43:20 +0000
Resent-Date: Tue, 02 Aug 2016 12:43:20 +0000
Resent-Message-Id: <E1bUZ2W-0005qr-On@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <nicolas.mailhot@laposte.net>) id 1bUZ2R-0005oW-OG for ietf-http-wg@listhub.w3.org; Tue, 02 Aug 2016 12:43:15 +0000
Received: from smtpoutz10.laposte.net ([194.117.213.175] helo=smtp.laposte.net) by maggie.w3.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from <nicolas.mailhot@laposte.net>) id 1bUZ2L-0002T8-Q8 for ietf-http-wg@w3.org; Tue, 02 Aug 2016 12:43:14 +0000
Received: from smtp.laposte.net (localhost [127.0.0.1]) by lpn-prd-vrout004 (Postfix) with ESMTP id A4904591771 for <ietf-http-wg@w3.org>; Tue, 2 Aug 2016 14:40:31 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=laposte.net; s=mail0; t=1470141631; bh=KaKcWOlsFIyPWgdjor3b+tCZIofvX3W9ZkI5ov0SVxg=; h=Date:From:To:Cc:In-Reply-To:References:Subject; b=UDTR1lqOENN9DTiwioylQCN7oLsceQCrMlHiCxqwYblo1UN6exjLsuIbw+nWrw3L3 7T3C0s7Ay0iZ/bc4q17EJNpjs0EXKzzUMxTWyFo9obu4bOMnsQu1cStr7M3/fXG+Sj SelcanroOg66cQtbqYip4tig1H9hmChUEVWni9bYToh5VDXsoUVqA1IBEfr63nLBlb eALJzxNboJoblzR807nkGVZMh64edrQdH4nW6Mv9eT89HvygrtK/SleNmdZ1oVywo2 AaCWuaS2wTmKDmxzgzbtQmOBBSPaqm1ayRGyJSLqKiQQUHxyTzOZ5cFkEuZNe6WqdV jKHrbV6IcV6lA==
Received: from smtp.laposte.net (localhost [127.0.0.1]) by lpn-prd-vrout004 (Postfix) with ESMTP id 4707D591985 for <ietf-http-wg@w3.org>; Tue, 2 Aug 2016 14:40:31 +0200 (CEST)
Received: from lpn-prd-mstr088.laposte (lpn-prd-mstr088 [10.128.59.114]) by lpn-prd-vrout004 (Postfix) with ESMTP id 329AB5916F3; Tue, 2 Aug 2016 14:40:31 +0200 (CEST)
Date: Tue, 02 Aug 2016 14:40:30 +0200
From: nicolas.mailhot@laposte.net
To: Poul-Henning Kamp <phk@phk.freebsd.dk>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Message-ID: <353202556.1155109.1470141630778.JavaMail.zimbra@laposte.net>
In-Reply-To: <52025.1470048651@critter.freebsd.dk>
References: <77778.1470037414@critter.freebsd.dk> <7B76F00B-2CAF-42A4-B09C-FA0748A4D025@laposte.net> <52025.1470048651@critter.freebsd.dk>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-Originating-IP: [77.134.188.55]
X-Mailer: Zimbra 8.0.6_GA_5922 (ZimbraWebClient - FF48 (Linux)/La Poste)
Thread-Topic: If not JSON, what then ?
Thread-Index: cygS+eJRViRZ4y8mTl7vZu7d2rnA/g==
X-VR-SrcIP: [77.134.188.55]
X-VR-FullState: 0
X-VR-Score: 0
X-VR-Cause-1: gggruggvucftvghtrhhoucdtuddrfeeltddrjeekgdeftdcutefuodetggdotefrodftvfcurfhrohhf
X-VR-Cause-2: ihhlvgemucfntefrqffuvffgnecuuegrihhlohhuthemucehtddtnecunecujfgurhepfffhvffkjghf
X-VR-Cause-3: ufggtgfgihfothesthejtgdtredtjeenucfhrhhomhepnhhitgholhgrshdrmhgrihhlhhhotheslhgr
X-VR-Cause-4: phhoshhtvgdrnhgvthenucfkphepuddtrdduvdekrdehledruddugedpjeejrddufeegrddukeekrdeh
X-VR-Cause-5: heenucfrrghrrghmpehmohguvgepshhmthhpohhuthdphhgvlhhopehlphhnqdhprhguqdhmshhtrhdt
X-VR-Cause-6: keekrdhlrghpohhsthgvpdhinhgvthepuddtrdduvdekrdehledruddugedpmhgrihhlfhhrohhmpehn
X-VR-Cause-7: ihgtohhlrghsrdhmrghilhhhohhtsehlrghpohhsthgvrdhnvghtpdhrtghpthhtohepihgvthhfqdhh
X-VR-Cause-8: thhtphdqfihgseiffedrohhrgh
X-VR-AvState: No
X-VR-State: 0
Received-SPF: pass client-ip=194.117.213.175; envelope-from=nicolas.mailhot@laposte.net; helo=smtp.laposte.net
X-W3C-Hub-Spam-Status: No, score=-4.0
X-W3C-Hub-Spam-Report: BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RP_MATCHES_RCVD=-1.243, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: maggie.w3.org 1bUZ2L-0002T8-Q8 39894f1068774100bc6721ecf2b7ac2d
X-Original-To: ietf-http-wg@w3.org
Subject: Re: If not JSON, what then ?
Archived-At: <http://www.w3.org/mid/353202556.1155109.1470141630778.JavaMail.zimbra@laposte.net>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32138
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>


----- Mail original -----
De: "Poul-Henning Kamp"

>>If you're ready to invent binary representations it's way
>> imple to specify utf8 as encoding than fall again on multiple
>> encoding trap which instead of helping anyone means everyone is
>> incompatible with everyone else in subtle way

>Please elaborate, I have no idea what your are talking about here.

I thouroughly mislike all the encoding dance and escaping one time it's UTF-8 another not.

It's too complex, people won't read it, just do their usual mess and assume it will work (just like they post garbage nowadays and add ISO-8859-1 boilerplate without checking anything. Encoding hints do not help, instead of wrong encoding failure you add combos of bad encoding hint + whatever failures)

Please use a simpler rule like
 1. Everything not explicitely encoded is UTF-8 with no escaping allowed (or escaping restricted to a shortlist, not generic escaping that people will apply to all codepoints several times over just in case, no BOM, no pseudo-BOM, if they write nonsensical UTF-8 it's *their* problem not the transport problem, as long as they respect basic UTF-8 rules)
 2. an UTF-8 header that does not validate in whatever version of the next hop unicode engine aborts the frame (if you don't want to learn UTF-8 restrict yourself to basic latin block in your headers, it's valid UTF-8 and no more complex than ASCII)
 3. anything that does not fit there must use binary with explicit binary flag

That is simple enough people will remember it, they will curse you but apply it, instead of fell-good rules that everyone follows approximatively with an explosion of special cases to handle all the approximation results

Regards,

-- 
Nicolas Mailhot