Re: [hybi] RFC6455 clarification: when received close code of 1005, 1006, 1015

Alexey Melnikov <alexey.melnikov@isode.com> Wed, 09 May 2012 19:57 UTC

Return-Path: <alexey.melnikov@isode.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 332CC11E80CA for <hybi@ietfa.amsl.com>; Wed, 9 May 2012 12:57:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.711
X-Spam-Level:
X-Spam-Status: No, score=-102.711 tagged_above=-999 required=5 tests=[AWL=-0.112, BAYES_00=-2.599, 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 6PgYrS-cVzFV for <hybi@ietfa.amsl.com>; Wed, 9 May 2012 12:57:10 -0700 (PDT)
Received: from rufus.isode.com (cl-125.lon-03.gb.sixxs.net [IPv6:2a00:14f0:e000:7c::2]) by ietfa.amsl.com (Postfix) with ESMTP id 7A9FB11E8079 for <hybi@ietf.org>; Wed, 9 May 2012 12:57:04 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1336593422; d=isode.com; s=selector; i=@isode.com; bh=BH7heKhiUabK3W8ioMwXYpVcxpjFCEygblZkc7pomw4=; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version: In-Reply-To:References:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description; b=GER20Huo34RS2vxQh9Crube4QpMx8kBtf5of98el9XnnPS+3JmjUA+FJM0t6irlLCJ4/Zq xQCZuu/4IVqWuMYRQVpAzRohH3qTaZqTNw+aB+LRiLyuN0RYh8RBxdXWTTWFqh6ydrTAzP XopWWD+CCvdD22Je0TWWYDNnLsYpIeQ=;
Received: from [172.16.1.29] (shiny.isode.com [62.3.217.250]) by rufus.isode.com (submission channel) via TCP with ESMTPSA id <T6rMDQB=gyM7@rufus.isode.com>; Wed, 9 May 2012 20:57:01 +0100
X-SMTP-Protocol-Errors: PIPELINING
Message-ID: <4FAACC40.6040308@isode.com>
Date: Wed, 09 May 2012 20:57:52 +0100
From: Alexey Melnikov <alexey.melnikov@isode.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2
To: Takeshi Yoshino <tyoshino@google.com>
References: <CAH9hSJbQ7dcu4N=Yf7TyFzJ0FhfVRehEMtnFx3Qvv_W0T5Cs+A@mail.gmail.com>
In-Reply-To: <CAH9hSJbQ7dcu4N=Yf7TyFzJ0FhfVRehEMtnFx3Qvv_W0T5Cs+A@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org
Subject: Re: [hybi] RFC6455 clarification: when received close code of 1005, 1006, 1015
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: Wed, 09 May 2012 19:57:11 -0000

On 09/05/2012 06:12, Takeshi Yoshino wrote:
> Hi,
Hi Takeshi,
> Endpoints MUST NOT send a close frame with close code of 1005, 1006 or 
> 1015.
>
> What should we do when received such a frame from a broken endpoint? 
> It seems there's no text specifying this.
I think Garbage-In-Garbage-Out rule applies here, but as this affect the 
WebSocket API, you are right we should clarify this.
> I think this should be taken as protocol error. The endpoint received 
> such a bad close frame should _Fail the WebSocket Connection_ and 
> invoke onclose() with code=1006 and wasClean=false.
1006 seems as good of a code for this as any. Does "wasClean=false" 
matter in this case?

Alternatively, we can reserve a new "you lied to me about your reason" 
close code.

> Thoughts?
>
> Takeshi