Re: [hybi] WS URLs

Alexey Melnikov <alexey.melnikov@isode.com> Mon, 24 October 2011 13:02 UTC

Return-Path: <lunohod.baikonur@googlemail.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 697AA21F8BDB for <hybi@ietfa.amsl.com>; Mon, 24 Oct 2011 06:02:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.971
X-Spam-Level:
X-Spam-Status: No, score=-102.971 tagged_above=-999 required=5 tests=[AWL=0.005, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-1, USER_IN_WHITELIST=-100]
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 g6qWvaoQXAN8 for <hybi@ietfa.amsl.com>; Mon, 24 Oct 2011 06:02:37 -0700 (PDT)
Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by ietfa.amsl.com (Postfix) with ESMTP id 6F45121F8AF4 for <hybi@ietf.org>; Mon, 24 Oct 2011 06:02:37 -0700 (PDT)
Received: by iabn5 with SMTP id n5so9061728iab.31 for <hybi@ietf.org>; Mon, 24 Oct 2011 06:02:36 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=q0vcJhcdCHiAi0cr7iavirWkRJpgthPEUp8bd68n+Ag=; b=G9X1o7LTl41jgkzcVMw7YS/8xjOvURo7De/NtTQnLl9kACVAgwrlZOPOpyRWiFcTvJ p+Hs3xO1fdYIfu0dNfEo7Aia2V1wGDjt0Vb4ew9QzwtO1ov5gcJW8OUBuuuq9z2ZeRT/ b+jQNXneLZNxwCVbeYgUWtQWKL8KGj4xau1gA=
MIME-Version: 1.0
Received: by 10.42.158.9 with SMTP id f9mr40968126icx.31.1319461356799; Mon, 24 Oct 2011 06:02:36 -0700 (PDT)
Sender: lunohod.baikonur@googlemail.com
Received: by 10.42.247.199 with HTTP; Mon, 24 Oct 2011 06:02:36 -0700 (PDT)
In-Reply-To: <634914A010D0B943A035D226786325D42D0B036D37@EXVMBX020-12.exch020.serverdata.net>
References: <AcyRAfMcynScsoopThG4iaBqB+cA5Q==> <634914A010D0B943A035D226786325D42D0B036D37@EXVMBX020-12.exch020.serverdata.net>
Date: Mon, 24 Oct 2011 14:02:36 +0100
X-Google-Sender-Auth: bw-NLDok93L6nLuX3cfCTqYKpsA
Message-ID: <CADkeqZWDBH1KP2yLXSvNz+zyqGuWcwNBUzKgbupLCSZHsKXyTQ@mail.gmail.com>
From: Alexey Melnikov <alexey.melnikov@isode.com>
To: Tobias Oberstein <tobias.oberstein@tavendo.de>
Content-Type: multipart/alternative; boundary="90e6ba21219b77868a04b00b09e1"
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [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: Mon, 24 Oct 2011 13:02:38 -0000

Hi Tobias,

On Sat, Oct 22, 2011 at 5:40 PM, Tobias Oberstein <
tobias.oberstein@tavendo.de> wrote:

> 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

I think all of these are invalid.

> 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?
>
As far as I remember WS/WSS URLs are not sent during the opening handshake.
They can only be used to initiate one.

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

As per above, the WebSocket server doesn't need to do this.