[hybi] WS URLs

Tobias Oberstein <tobias.oberstein@tavendo.de> Sat, 22 October 2011 21:40 UTC

Return-Path: <tobias.oberstein@tavendo.de>
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 6FD7021F86EC for <hybi@ietfa.amsl.com>; Sat, 22 Oct 2011 14:40:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.599
X-Spam-Level:
X-Spam-Status: No, score=-2.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599]
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 8HNowORhWXTR for <hybi@ietfa.amsl.com>; Sat, 22 Oct 2011 14:40:23 -0700 (PDT)
Received: from EXHUB020-3.exch020.serverdata.net (exhub020-3.exch020.serverdata.net [206.225.164.30]) by ietfa.amsl.com (Postfix) with ESMTP id A47FA21F86A6 for <hybi@ietf.org>; Sat, 22 Oct 2011 14:40:23 -0700 (PDT)
Received: from EXVMBX020-12.exch020.serverdata.net ([169.254.3.230]) by EXHUB020-3.exch020.serverdata.net ([206.225.164.30]) with mapi; Sat, 22 Oct 2011 14:40:22 -0700
From: Tobias Oberstein <tobias.oberstein@tavendo.de>
To: "hybi@ietf.org" <hybi@ietf.org>
Date: Sat, 22 Oct 2011 14:40:20 -0700
Thread-Topic: WS URLs
Thread-Index: AcyRAfMcynScsoopThG4iaBqB+cA5Q==
Message-ID: <634914A010D0B943A035D226786325D42D0B036D37@EXVMBX020-12.exch020.serverdata.net>
Accept-Language: de-DE, en-US
Content-Language: de-DE
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: de-DE, en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: [hybi] WS URLs
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: Sat, 22 Oct 2011 21:40:24 -0000

2 short questions .. first one is part of http://bugs.python.org/issue13244

Which of the following URLs are valid WS URLs?

1. ws://example.com/something#somewhere
2. ws://example.com/something#somewhere/
3. ws://example.com/something#somewhere/foo
4. ws://example.com/something?query=foo#bar
5. ws://example.com/something%23somewhere
6. ws://example.com/something%23somewhere/
7. ws://example.com/something%23somewhere/foo
8. ws://example.com/something?query=foo%23bar

%23 = # "percentage escaped"

Hybi-17 spec:

"Fragment identifiers are meaningless in the context of WebSocket
URIs, and MUST NOT be used on these URIs.  The character "#" in URIs
MUST be escaped as %23 if used as part of the query component."

"path = <path-abempty, defined in [RFC3986], Section 3.3>"

http://tools.ietf.org/html/rfc3986:

"The path is terminated by the first question mark ("?") or number sign ("#") character, or by the end of the URI."

==

When an invalid WS URLs is received in the client request during opening handshake,
how is the server supposed to react?

Fail the handshake (i.e. http 400 Bad request), or "ignore" invalid parts (like fragment component)?