Re: [ietf-types] The application/www-form-urlencoded format

"Stephen D. Williams" <sdw@lig.net> Mon, 27 September 2010 07:46 UTC

Return-Path: <sdw@lig.net>
X-Original-To: ietf-types@core3.amsl.com
Delivered-To: ietf-types@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 516353A69FA for <ietf-types@core3.amsl.com>; Mon, 27 Sep 2010 00:46:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level:
X-Spam-Status: No, score=-1.999 tagged_above=-999 required=5 tests=[AWL=0.600, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Kon5iLsB9nna for <ietf-types@core3.amsl.com>; Mon, 27 Sep 2010 00:46:37 -0700 (PDT)
Received: from mail.lig.net (lig.net [64.69.38.223]) by core3.amsl.com (Postfix) with ESMTP id 7D2173A6C7A for <ietf-types@ietf.org>; Mon, 27 Sep 2010 00:46:37 -0700 (PDT)
Received: from sdwmbp.local (ligemail.lig.net [127.0.0.1]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: sdw) by mail.lig.net (Postfix) with ESMTP id 060CCAB5E33; Mon, 27 Sep 2010 00:55:31 -0700 (PDT)
Message-ID: <4CA04C02.7020807@lig.net>
Date: Mon, 27 Sep 2010 00:47:14 -0700
From: "Stephen D. Williams" <sdw@lig.net>
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.9) Gecko/20100915 Thunderbird/3.1.4
MIME-Version: 1.0
To: Bjoern Hoehrmann <derhoermi@gmx.net>
References: <k1os96p03o78p78490hei104biadpiepit@hive.bjoern.hoehrmann.de> <op.vjmuz10364w2qv@anne-van-kesterens-macbook-pro.local> <4C9FA0BB.8090106@lig.net> <4nav96tkh50itct882833rbjamou0r2jf0@hive.bjoern.hoehrmann.de>
In-Reply-To: <4nav96tkh50itct882833rbjamou0r2jf0@hive.bjoern.hoehrmann.de>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Cc: ietf-types@ietf.org
Subject: Re: [ietf-types] The application/www-form-urlencoded format
X-BeenThere: ietf-types@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: "Media \(MIME\) type review" <ietf-types.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/ietf-types>, <mailto:ietf-types-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/ietf-types>
List-Post: <mailto:ietf-types@ietf.org>
List-Help: <mailto:ietf-types-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/ietf-types>, <mailto:ietf-types-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 27 Sep 2010 07:46:38 -0000

  On 9/26/10 1:32 PM, Bjoern Hoehrmann wrote:
> * Stephen D. Williams wrote:
>>   On 9/26/10 2:22 AM, Anne van Kesteren wrote:
>>> On Sat, 25 Sep 2010 23:14:39 +0200, Bjoern Hoehrmann<derhoermi@gmx.net>  wrote:
>>>>    http://tools.ietf.org/html/draft-hoehrmann-urlencoded -- the draft de-
>>>> scribes the application/www-form-urlencoded format, a variant of the
>>>> application/x-www-form-urlencoded format first described in RFC 1866.
>> What the character encoding errors are at the end of section 5 needs to
>> be explained, at least for 2 cases.
> I believe the first encodes a pair of surrogate code points, the second
> a character beyond U+10FFFF, the first is an overlong sequence, then it
> is a truncated sequence, and finally you have an illegal starter with
> ASCII after it. They are all prohibited by the definition of UTF-8. I do
> not think that kind of technical detail would be well-placed there, but
> I could rephrase so it refers to UTF-8 directly instead of calling it
> "character encoding errors" though that's the same thing here.

In real life, say in Java, processing such data would throw an exception in the String library decoding methods.  That's fine, 
however it is not really about the www-form-urlencoded level format/parsing, but the next level down, UTF-8.  When I read that 
section, I expected to see data malformed at that syntax level: "%HA%##", etc.  You can simply say that data that is not valid UTF-8 
produces undefined results (i.e. exceptions, etc.).  That's true of the format itself.

Stephen