Re: [hybi] I-D Action:draft-ietf-hybi-thewebsocketprotocol-05.txt

Takeshi Yoshino <tyoshino@google.com> Thu, 10 February 2011 21:04 UTC

Return-Path: <tyoshino@google.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id C65243A69EB for <hybi@core3.amsl.com>; Thu, 10 Feb 2011 13:04:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.826
X-Spam-Level:
X-Spam-Status: No, score=-104.826 tagged_above=-999 required=5 tests=[AWL=1.150, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SLAk6ybUa-vn for <hybi@core3.amsl.com>; Thu, 10 Feb 2011 13:04:25 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id 6B7203A6838 for <hybi@ietf.org>; Thu, 10 Feb 2011 13:04:25 -0800 (PST)
Received: from wpaz9.hot.corp.google.com (wpaz9.hot.corp.google.com [172.24.198.73]) by smtp-out.google.com with ESMTP id p1AL4boe014241 for <hybi@ietf.org>; Thu, 10 Feb 2011 13:04:37 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1297371877; bh=rCBjAUCdN9YhYZeN7dZGg20EnbU=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=uwxMDIY5fZ31mWXGIx9/2/bo2Gzj+mWCFKX6oE42J4GHbnZ4O4olt9LG89uRMGbRD 3LPBOEeIAATWm5pNzGAZA==
Received: from gyd8 (gyd8.prod.google.com [10.243.49.200]) by wpaz9.hot.corp.google.com with ESMTP id p1AL4aq4002160 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for <hybi@ietf.org>; Thu, 10 Feb 2011 13:04:36 -0800
Received: by gyd8 with SMTP id 8so848717gyd.20 for <hybi@ietf.org>; Thu, 10 Feb 2011 13:04:36 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=9LzKIH8/b2jbkfQ0Gdb6lvqz+zNv4mIlMGob3y70PDo=; b=T+wmTv1mNyOSRFMHXpYm61LtAGN5zHmJTJSzH4pio8/iVBaf4/gTCL3RoIrocfdsgg elterr8G567uRiz39NIQ==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=EsTZSVd9nAXkLAlX1nAY9e5XBEyT+AqLMeMQaEpHTj9Qh6BRq1vJSbC+xltrMJIMil +0GiyFTYPZbDWGC8mqQg==
Received: by 10.150.144.19 with SMTP id r19mr3868740ybd.162.1297371876308; Thu, 10 Feb 2011 13:04:36 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.91.16 with HTTP; Thu, 10 Feb 2011 13:04:16 -0800 (PST)
In-Reply-To: <OF44DCAB38.CFF4042C-ON88257833.0030697C-88257833.003C5A3E@playstation.sony.com>
References: <20110208231502.31262.8249.idtracker@localhost> <OF44DCAB38.CFF4042C-ON88257833.0030697C-88257833.003C5A3E@playstation.sony.com>
From: Takeshi Yoshino <tyoshino@google.com>
Date: Fri, 11 Feb 2011 06:04:16 +0900
Message-ID: <AANLkTin9mySdN_FrB7sGa+rfRARnkXs3cqPf+kFarQOn@mail.gmail.com>
To: Yutaka_Takeda@playstation.sony.com
Content-Type: multipart/alternative; boundary="000e0cd56a96d438e0049bf3ed63"
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] I-D Action:draft-ietf-hybi-thewebsocketprotocol-05.txt
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/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: Thu, 10 Feb 2011 21:04:27 -0000

Hi Yutaka-san,

On Thu, Feb 10, 2011 at 19:59, <Yutaka_Takeda@playstation.sony.com> wrote:

>
> o Section 1.3 - discrepancy in SHA1 hash value:
>
> My python says:
> >>> h = hashlib.sha1()
> >>> h.update('dGhlIHNhbXBsZSBub25jZQ==258EAFA5-E914-47DA-95CA-
> C5AB0DC85B11')
> >>> h.hexdigest()
> '1b334d8e1b8d57c1c7a214517c106abc434282b8'
>
>
remove a space between 95CA- and C5AB, and you get what's on the spec.

>>> import hashlib
>>> h = hashlib.sha1()
>>> h.update('dGhlIHNhbXBsZSBub25jZQ==258EAFA5-E914-47DA-95CA-C5AB0DC85B11')
>>> h.hexdigest()
'b37a4f2cc0624f1690f64606cf385945b2bec4ea'


> o Section 4.5.1 - the term "body"
>
> For consistency, it should be replaced with Application Data, or "body" be
> defined explicitly in the document.
>
>
agreed

>
> o Section 4.5.1 - Close handshake
>
> It is no clear to me what 0x43 and 0x53 are trying to achieve. In TCP,
> there is FIN with no
> details of why/who is closing for graceful shutdown.
>
>
Actually, it's not intended to indicate who's closing, but to make sure what
the close frame really means, i.e. it's close initiation or close
acknowledgement. Using an analogy of TCP, close S from server is FIN, and
close S from client is ACK for server's FIN.

Without this, each peer cannot know
- the other peer just initiated close
or
- the other peer received close frame and acknowledged it

Imagine both peers send out close initiation at approximately same time.
They looks like acknowledgement but are not.

Once we can perfectly distinguish initiation and acknowledgement as
described above, we can assume "If A received close acknowledgement from B,
B has received all the data sent from A before close successfully".

If you have any idea about the usefulness of this closing handshake design,
please come to the thread "Clarify the role of closing handshake" and speak
out. We're discussing it now.

Takeshi