[hybi] Editorial issue: Ignoring rather than failing on URI fragments

Henrik Frystyk Nielsen <henrikn@microsoft.com> Mon, 09 May 2011 17:04 UTC

Return-Path: <henrikn@microsoft.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C60B4E06C3 for <hybi@ietfa.amsl.com>; Mon, 9 May 2011 10:04:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_HI=-8]
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 0+MES210R8A9 for <hybi@ietfa.amsl.com>; Mon, 9 May 2011 10:04:57 -0700 (PDT)
Received: from smtp.microsoft.com (mailc.microsoft.com [131.107.115.214]) by ietfa.amsl.com (Postfix) with ESMTP id 84E29E088C for <hybi@ietf.org>; Mon, 9 May 2011 10:04:51 -0700 (PDT)
Received: from TK5EX14HUBC103.redmond.corp.microsoft.com (157.54.86.9) by TK5-EXGWY-E803.partners.extranet.microsoft.com (10.251.56.169) with Microsoft SMTP Server (TLS) id 8.2.176.0; Mon, 9 May 2011 10:04:51 -0700
Received: from TK5EX14MBXC218.redmond.corp.microsoft.com ([169.254.8.192]) by TK5EX14HUBC103.redmond.corp.microsoft.com ([157.54.86.9]) with mapi id 14.01.0289.008; Mon, 9 May 2011 10:04:50 -0700
From: Henrik Frystyk Nielsen <henrikn@microsoft.com>
To: "Hybi (hybi@ietf.org)" <hybi@ietf.org>
Thread-Topic: Editorial issue: Ignoring rather than failing on URI fragments
Thread-Index: AcwOaxsxwqjsFB8DTVWb72nxpviA9g==
Date: Mon, 09 May 2011 17:04:49 +0000
Message-ID: <F1D6C4CA564CA347B3B9EB54BEA5AD7C0CB620C5@TK5EX14MBXC218.redmond.corp.microsoft.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
x-originating-ip: [157.54.51.75]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: [hybi] Editorial issue: Ignoring rather than failing on URI fragments
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 09 May 2011 17:04:57 -0000

Regarding handling URI fragments, section 3.1 [0] of the 07 draft states in point 4 that 

    4.   If /uri/ has a <fragment> component, then fail this algorithm.

However, the "XMLHttpRequest, W3C Candidate Recommendation 3 August 2010" specification states that the caller is supposed to DROP the fragment (i.e. to ignore, not to fail): 

    1. Let url be a URL. 
    2. Let URL character encoding of url be UTF-8. 
    3. Resolve url relative to the XMLHttpRequest base URL. If the algorithm returns an error raise a SYNTAX_ERR exception and terminate these steps. 
    4. Drop <fragment> from url. 

This is also the correct behavior for HTTP clients and consistent with URI semantics. 

I propose that the text be changed to the following:

    4.   If /uri/ has a <fragment> component, then drop it.

Thanks,

Henrik

[0] http://tools.ietf.org/html/draft-ietf-hybi-thewebsocketprotocol-07#section-3.1
[1] http://www.w3.org/TR/XMLHttpRequest/