Re: HTTP URI in the form of "http://example.com?query"

Zhong Yu <zhong.j.yu@gmail.com> Tue, 04 June 2013 17:47 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 15B1E21F9C4C for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 4 Jun 2013 10:47:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.598
X-Spam-Level:
X-Spam-Status: No, score=-10.598 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HS_INDEX_PARAM=0.001, RCVD_IN_DNSWL_HI=-8]
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 OTIDXXLEz2p0 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 4 Jun 2013 10:47:01 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id E20A921F9CB5 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 4 Jun 2013 09:48:02 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UjuNO-0005Wo-DJ for ietf-http-wg-dist@listhub.w3.org; Tue, 04 Jun 2013 16:46:26 +0000
Resent-Date: Tue, 04 Jun 2013 16:46:26 +0000
Resent-Message-Id: <E1UjuNO-0005Wo-DJ@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <zhong.j.yu@gmail.com>) id 1UjuNC-0005W4-1y for ietf-http-wg@listhub.w3.org; Tue, 04 Jun 2013 16:46:14 +0000
Received: from mail-ob0-f174.google.com ([209.85.214.174]) by lisa.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <zhong.j.yu@gmail.com>) id 1UjuN7-0003qT-6z for ietf-http-wg@w3.org; Tue, 04 Jun 2013 16:46:14 +0000
Received: by mail-ob0-f174.google.com with SMTP id wd20so793979obb.5 for <ietf-http-wg@w3.org>; Tue, 04 Jun 2013 09:45:43 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wi1TvCAEXfAvc/LsOr8RMdGYjZME8lazOcowSasI26U=; b=mPq6KsyCDeevIqWXfuRKAiUEjJa85ZkYvZfwDV12aU4aIq2sziNEARIm+0Z70EyDr6 N54p3jUg47TCBT2qcpbo/RE55lsPdXJVyy+HkwYF1Zs6rBoWjOywZ80rZS2qp+DCrK67 O6VNMSJCIK9cDsR0xbGBYuFB5cjo+c2IPYxZq+sdju2Qabw24eF31P8P/x/BbLKP/09l WFFiPYcBi4tKbHCVJdgfG6cBVmG+D7GmO0hH9yO+lmJ7rTX3Tzq0cRyAngJoYv6rww0r II6FMi9tUG3y08ingPXiyZoyMvVN6cPOBRoj3b5oKYFrOv9YgWhvoBlDDiTW0tmFtDxx 0xoQ==
MIME-Version: 1.0
X-Received: by 10.60.15.201 with SMTP id z9mr3320478oec.110.1370364343029; Tue, 04 Jun 2013 09:45:43 -0700 (PDT)
Received: by 10.76.79.8 with HTTP; Tue, 4 Jun 2013 09:45:42 -0700 (PDT)
In-Reply-To: <C54A3377-A891-422D-BDFB-E14DF2E4F7A3@gbiv.com>
References: <CACuKZqFvFo2ztDBZwMVtSE54rvHthyJJc-8X-yFq=CSVMy9GXw@mail.gmail.com> <51AD8EC1.4010608@gmx.de> <CAP+FsNd3mWAtQ_Fn_Kvtx28300SO761fEZBhnm9NrHv_WQ2BjQ@mail.gmail.com> <51AD9A87.9020403@gmx.de> <CAP+FsNe9oZQPxS-8rhz=MYiLj8aceKFTCJow4wrRnXDrrgdzww@mail.gmail.com> <51AD9F87.5050603@gmx.de> <alpine.DEB.2.00.1306041215460.32021@tvnag.unkk.fr> <CACuKZqEqTHa0uy9hjzKT9ctm3SZ9q2ySe2brrGy3v82HKVxfvQ@mail.gmail.com> <C54A3377-A891-422D-BDFB-E14DF2E4F7A3@gbiv.com>
Date: Tue, 04 Jun 2013 11:45:42 -0500
Message-ID: <CACuKZqHOMvcun9QV6zzeqVy8rWULjdL9ZU-49rmYt+qrC2tmkQ@mail.gmail.com>
From: Zhong Yu <zhong.j.yu@gmail.com>
To: "Roy T. Fielding" <fielding@gbiv.com>
Cc: Daniel Stenberg <daniel@haxx.se>, Julian Reschke <julian.reschke@gmx.de>, Roberto Peon <grmocg@gmail.com>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: text/plain; charset="ISO-8859-1"
Received-SPF: pass client-ip=209.85.214.174; envelope-from=zhong.j.yu@gmail.com; helo=mail-ob0-f174.google.com
X-W3C-Hub-Spam-Status: No, score=-3.4
X-W3C-Hub-Spam-Report: AWL=-2.621, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1UjuN7-0003qT-6z 7a0c4d128fead96baffa2d9acea0aef0
X-Original-To: ietf-http-wg@w3.org
Subject: Re: HTTP URI in the form of "http://example.com?query"
Archived-At: <http://www.w3.org/mid/CACuKZqHOMvcun9QV6zzeqVy8rWULjdL9ZU-49rmYt+qrC2tmkQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/18175
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>

All right, everybody must be able to accept the URI. (Though privately
I'll never give that URI to anyone)

On Tue, Jun 4, 2013 at 11:00 AM, Roy T. Fielding <fielding@gbiv.com> wrote:
> No, the URI is correctly handled by all relevant implementations.
> There is no opportunity for error handling while parsing a URI,
> so it is useless to create corner cases where a parser doesn't
> know what string is associated with which component.
>
> The ABNF in 2616 was known to be buggy since before it was even
> published, so I have no interest in considering it further.
>
> The definition of http URIs in practice is that they accept any
> string, parse according to the regex in 3986, and fix such things
> as an empty path as part of the request handling.  The only part
> of HTTP that needs to consider this case is the creation of a
> request-target, and we already have that requirement in the spec.
>
> ....Roy
>
>
> On Jun 4, 2013, at 8:38 AM, Zhong Yu wrote:
>
>> How about we add some cautionary notes on this kind of URIs:
>> 1. consumers must accept them
>> 2. producers should not produce them
>> 3. a middle man should add the slash before forwarding it to others.
>>
>> Zhong Yu
>>
>>
>> On Tue, Jun 4, 2013 at 5:19 AM, Daniel Stenberg <daniel@haxx.se> wrote:
>>> On Tue, 4 Jun 2013, Julian Reschke wrote:
>>>
>>>> Yes, but what's the exact breakage except for one component not processing
>>>> that edge case? It's an edge case after all?
>>>
>>>
>>> I only recently got a bug report for curl as when we got an input such as
>>> that and passed it to a particular (unspecified) proxy it would reject it as
>>> illegal.
>>>
>>> Thus curl nowadays will insert a slash before passing on the URL to a proxy.
>>>
>>> --
>>>
>>> / daniel.haxx.se
>>
>