
From w@1wt.eu  Tue Nov  1 00:29:27 2011
Return-Path: <w@1wt.eu>
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 DB37021F8F77 for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 00:29:27 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.171
X-Spam-Level: 
X-Spam-Status: No, score=-6.171 tagged_above=-999 required=5 tests=[AWL=-4.428, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, MIME_8BIT_HEADER=0.3]
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 w08PlQyPub2X for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 00:29:27 -0700 (PDT)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by ietfa.amsl.com (Postfix) with ESMTP id 4AC7621F8F75 for <hybi@ietf.org>; Tue,  1 Nov 2011 00:29:25 -0700 (PDT)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id pA17TJIp012828; Tue, 1 Nov 2011 08:29:19 +0100
Date: Tue, 1 Nov 2011 08:29:19 +0100
From: Willy Tarreau <w@1wt.eu>
To: =?iso-8859-1?Q?I=F1aki?= Baz Castillo <ibc@aliax.net>
Message-ID: <20111101072919.GB12765@1wt.eu>
References: <CALiegfmgYSFvz0XRNR+YWQkb7CVg0WOK4bb=Od54t-Y9vQQbMA@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CALiegfmgYSFvz0XRNR+YWQkb7CVg0WOK4bb=Od54t-Y9vQQbMA@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: hybi@ietf.org
Subject: Re: [hybi] How are Cookies added?
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: Tue, 01 Nov 2011 07:29:28 -0000

Hi Iñaki,

On Mon, Oct 31, 2011 at 08:20:02PM +0100, Iñaki Baz Castillo wrote:
> Must I assume that Cookies will just be added (and automatically
> added) to the HTTP GET in case the URL of the WebSocket URI matches
> the domain of a previously visited web page?
> 
> I hope the answer is "not", but given the nature of WebSocket I expect
> this is the only way, so this stuf will force me to use the same
> domain for the Web server and the WebSocket server (and then use all
> that funny HTTP stuf like undefined proxies, load-balancers and so).
> Please tell me that I'm wrong.

What's wrong with having a websocket server under the same domain as
the web server ? At some point you want the code running in browsers
to be able to tell whether to send or not sensitive data to some site,
and domains are what's used to determine if cookies must be sent.

You could for instance have www.yourdomain.com and ws.yourdomain.com
and use a cookie valid on ".yourdomain.com". I don't see why that would
make you use proxies or load balancers.

Regards,
Willy


From ibc@aliax.net  Tue Nov  1 05:19:10 2011
Return-Path: <ibc@aliax.net>
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 0C2CE11E8215 for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 05:19:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.645
X-Spam-Level: 
X-Spam-Status: No, score=-2.645 tagged_above=-999 required=5 tests=[AWL=0.032,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 r+WYf7WmiElQ for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 05:19:09 -0700 (PDT)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by ietfa.amsl.com (Postfix) with ESMTP id 0ADA111E8253 for <hybi@ietf.org>; Tue,  1 Nov 2011 05:19:08 -0700 (PDT)
Received: by vws5 with SMTP id 5so6766840vws.31 for <hybi@ietf.org>; Tue, 01 Nov 2011 05:19:08 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.240.145 with SMTP id wa17mr8424264vdc.118.1320149948424; Tue, 01 Nov 2011 05:19:08 -0700 (PDT)
Received: by 10.220.184.6 with HTTP; Tue, 1 Nov 2011 05:19:08 -0700 (PDT)
In-Reply-To: <20111101072919.GB12765@1wt.eu>
References: <CALiegfmgYSFvz0XRNR+YWQkb7CVg0WOK4bb=Od54t-Y9vQQbMA@mail.gmail.com> <20111101072919.GB12765@1wt.eu>
Date: Tue, 1 Nov 2011 13:19:08 +0100
Message-ID: <CALiegfnWD4-NNCFO898Xne4j+X1cnZXJ85hJMZT3J8+UDt94Tg@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Willy Tarreau <w@1wt.eu>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] How are Cookies added?
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: Tue, 01 Nov 2011 12:19:10 -0000

2011/11/1 Willy Tarreau <w@1wt.eu>:
> On Mon, Oct 31, 2011 at 08:20:02PM +0100, I=C3=B1aki Baz Castillo wrote:
>> Must I assume that Cookies will just be added (and automatically
>> added) to the HTTP GET in case the URL of the WebSocket URI matches
>> the domain of a previously visited web page?
>>
>> I hope the answer is "not", but given the nature of WebSocket I expect
>> this is the only way, so this stuf will force me to use the same
>> domain for the Web server and the WebSocket server (and then use all
>> that funny HTTP stuf like undefined proxies, load-balancers and so).
>> Please tell me that I'm wrong.
>
> What's wrong with having a websocket server under the same domain as
> the web server ? At some point you want the code running in browsers
> to be able to tell whether to send or not sensitive data to some site,
> and domains are what's used to determine if cookies must be sent.
>
> You could for instance have www.yourdomain.com and ws.yourdomain.com
> and use a cookie valid on ".yourdomain.com". I don't see why that would
> make you use proxies or load balancers.

Hi Willy, thanks a lot for your response. What worries me is the fact
that WebSocket just define a built-in authentication mechanism (the
"Cookie") and this is just valid when the web server and the websocket
server belong to the same "website" or provider, so I cannot build me
own page and include a JS from an external provider in which a
WebSocket connection takes place with such external provider. Well, I
can do it but I cannot pass a Cookie so the authentication must be
done within the WebSocket Subprotocol.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From ibc@aliax.net  Tue Nov  1 05:43:30 2011
Return-Path: <ibc@aliax.net>
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 410AB11E871C for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 05:43:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.569
X-Spam-Level: 
X-Spam-Status: No, score=-2.569 tagged_above=-999 required=5 tests=[AWL=-0.044, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, SARE_SUB_ENC_UTF8=0.152]
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 lJAIwZE2TN-M for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 05:43:29 -0700 (PDT)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by ietfa.amsl.com (Postfix) with ESMTP id 550D711E8744 for <hybi@ietf.org>; Tue,  1 Nov 2011 05:43:29 -0700 (PDT)
Received: by vws5 with SMTP id 5so6792599vws.31 for <hybi@ietf.org>; Tue, 01 Nov 2011 05:43:28 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.70.98 with SMTP id l2mr8441316vdu.101.1320151408826; Tue, 01 Nov 2011 05:43:28 -0700 (PDT)
Received: by 10.220.184.6 with HTTP; Tue, 1 Nov 2011 05:43:28 -0700 (PDT)
Date: Tue, 1 Nov 2011 13:43:28 +0100
Message-ID: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: hybi@ietf.org
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Subject: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
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: Tue, 01 Nov 2011 12:43:30 -0000

Hi, I'm implementing SIP over WebSocket as I defined in:
  http://tools.ietf.org/html/draft-ibc-rtcweb-sip-websocket-00

Initially I mandated WS frames of type UTF-8 (as SIP
requests/responses use UTF-8 or ASCII) and I was happy. But now I've
realized that SIP protocol (RFC 3261), whose requests/responses are
very similar to HTTP ones, allows binary bodies in certain cases.

So now I must change the spec and mandate WS frames of type binary
*just* for the case in which a JavaScript implementation of SIP over
WebSocket receives a *valid* SIP request/response with binary body.

It's clear for me that the WS frame encoding indication is a bad idea.
IMHO the encoding should be defined by each WebSocket subprotocol by
leaving the WS frame layer not aware of it.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From jat@google.com  Tue Nov  1 06:35:15 2011
Return-Path: <jat@google.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 AAB401F0C42 for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 06:35:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.676
X-Spam-Level: 
X-Spam-Status: No, score=-102.676 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, 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 Jh76r+KhrUef for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 06:35:14 -0700 (PDT)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by ietfa.amsl.com (Postfix) with ESMTP id 9D8C511E816E for <hybi@ietf.org>; Tue,  1 Nov 2011 06:35:11 -0700 (PDT)
Received: by gyh20 with SMTP id 20so8456968gyh.31 for <hybi@ietf.org>; Tue, 01 Nov 2011 06:35:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-system-of-record; bh=I1k0Wc5HmbWAo+yE9dy6WLemQD9wCzXnljuXPBGLQlA=; b=BYnSvFqzzi4pP0IrndiBhbVosVCjTfKFqXOqTtkfbLxxMGmUzv3zWJvCh+dEAShgof CKZcj8MduxGzUowYs2TQ==
Received: by 10.150.214.14 with SMTP id m14mr532109ybg.74.1320154511269; Tue, 01 Nov 2011 06:35:11 -0700 (PDT)
Received: by 10.150.214.14 with SMTP id m14mr532097ybg.74.1320154511107; Tue, 01 Nov 2011 06:35:11 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.197.9 with HTTP; Tue, 1 Nov 2011 06:34:50 -0700 (PDT)
In-Reply-To: <CALiegfnWD4-NNCFO898Xne4j+X1cnZXJ85hJMZT3J8+UDt94Tg@mail.gmail.com>
References: <CALiegfmgYSFvz0XRNR+YWQkb7CVg0WOK4bb=Od54t-Y9vQQbMA@mail.gmail.com> <20111101072919.GB12765@1wt.eu> <CALiegfnWD4-NNCFO898Xne4j+X1cnZXJ85hJMZT3J8+UDt94Tg@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Tue, 1 Nov 2011 09:34:50 -0400
Message-ID: <CABLsOLCDutCoEB1L4w-bihJy0hnYg1=byS55awrCR2E92EdF9w@mail.gmail.com>
To: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
Content-Type: multipart/alternative; boundary=000e0cd352a8aee87b04b0ac6c67
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] How are Cookies added?
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: Tue, 01 Nov 2011 13:35:15 -0000

--000e0cd352a8aee87b04b0ac6c67
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 1, 2011 at 8:19 AM, I=C3=B1aki Baz Castillo <ibc@aliax.net> wro=
te:

> Hi Willy, thanks a lot for your response. What worries me is the fact
> that WebSocket just define a built-in authentication mechanism (the
> "Cookie") and this is just valid when the web server and the websocket
> server belong to the same "website" or provider, so I cannot build me
> own page and include a JS from an external provider in which a
> WebSocket connection takes place with such external provider. Well, I
> can do it but I cannot pass a Cookie so the authentication must be
> done within the WebSocket Subprotocol.


So you would propose sending every cookie to every server, just in case it
might be related to this server request?  That seems both a security
problem and horribly inefficient.

If it is really a third-party server, you probably want something designed
for that like OAuth (as has been discussed here previously).

--=20
John A. Tamplin
Software Engineer (GWT), Google

--000e0cd352a8aee87b04b0ac6c67
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Tue, Nov 1, 2011 at 8:19 AM, I=C3=B1aki Baz C=
astillo <span dir=3D"ltr">&lt;<a href=3D"mailto:ibc@aliax.net">ibc@aliax.ne=
t</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi Willy, thanks a lot for your response. What worries me is the fact<br>
that WebSocket just define a built-in authentication mechanism (the<br>
&quot;Cookie&quot;) and this is just valid when the web server and the webs=
ocket<br>
server belong to the same &quot;website&quot; or provider, so I cannot buil=
d me<br>
own page and include a JS from an external provider in which a<br>
WebSocket connection takes place with such external provider. Well, I<br>
can do it but I cannot pass a Cookie so the authentication must be<br>
done within the WebSocket Subprotocol.</blockquote></div><div><br></div>So =
you would propose sending every cookie to every server, just in case it mig=
ht be related to this server request? =C2=A0That seems both a security prob=
lem and horribly inefficient.<div>

<br></div><div>If it is really a third-party server, you probably want some=
thing designed for that like OAuth (as has been discussed here previously).=
<br clear=3D"all"><div><br></div>-- <br>John A. Tamplin<br>Software Enginee=
r (GWT), Google<br>


</div>

--000e0cd352a8aee87b04b0ac6c67--

From jat@google.com  Tue Nov  1 06:40:25 2011
Return-Path: <jat@google.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 7CCE321F97B5 for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 06:40:25 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.6
X-Spam-Level: 
X-Spam-Status: No, score=-102.6 tagged_above=-999 required=5 tests=[AWL=-0.076, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, SARE_SUB_ENC_UTF8=0.152, 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 87sV1DaHiIsa for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 06:40:24 -0700 (PDT)
Received: from mail-gx0-f172.google.com (mail-gx0-f172.google.com [209.85.161.172]) by ietfa.amsl.com (Postfix) with ESMTP id C2E6F21F9482 for <hybi@ietf.org>; Tue,  1 Nov 2011 06:40:24 -0700 (PDT)
Received: by ggnv1 with SMTP id v1so8408949ggn.31 for <hybi@ietf.org>; Tue, 01 Nov 2011 06:40:24 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-system-of-record; bh=SCowwk0QpOksi9oyf1EU8PKlQbOxR/lDSk+cSU8v4aU=; b=tvRo55ypVmTcJT48k/G8FB4a78PoqNw87VpsVR/GWcrOnRUWdasiuSfCaJYucKUpHy oi9NGRoWQqoeJKYDB19Q==
Received: by 10.150.166.12 with SMTP id o12mr606999ybe.44.1320154824312; Tue, 01 Nov 2011 06:40:24 -0700 (PDT)
Received: by 10.150.166.12 with SMTP id o12mr606982ybe.44.1320154824182; Tue, 01 Nov 2011 06:40:24 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.197.9 with HTTP; Tue, 1 Nov 2011 06:40:03 -0700 (PDT)
In-Reply-To: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com>
References: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Tue, 1 Nov 2011 09:40:03 -0400
Message-ID: <CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com>
To: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
Content-Type: multipart/alternative; boundary=000e0cd5a184580b3104b0ac7fac
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
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: Tue, 01 Nov 2011 13:40:25 -0000

--000e0cd5a184580b3104b0ac7fac
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 1, 2011 at 8:43 AM, I=C3=B1aki Baz Castillo <ibc@aliax.net> wro=
te:

> Hi, I'm implementing SIP over WebSocket as I defined in:
>  http://tools.ietf.org/html/draft-ibc-rtcweb-sip-websocket-00
>
> Initially I mandated WS frames of type UTF-8 (as SIP
> requests/responses use UTF-8 or ASCII) and I was happy. But now I've
> realized that SIP protocol (RFC 3261), whose requests/responses are
> very similar to HTTP ones, allows binary bodies in certain cases.
>
> So now I must change the spec and mandate WS frames of type binary
> *just* for the case in which a JavaScript implementation of SIP over
> WebSocket receives a *valid* SIP request/response with binary body.
>
> It's clear for me that the WS frame encoding indication is a bad idea.
> IMHO the encoding should be defined by each WebSocket subprotocol by
> leaving the WS frame layer not aware of it.
>

If you are sending binary data, then you have to send it in a binary frame
-- you can't pretend it is UTF8 text.

Having a separate text frame type was discussed over and over on this
group, including by you.  Please accept the consensus rather than
continuing to argue against it.

--=20
John A. Tamplin
Software Engineer (GWT), Google

--000e0cd5a184580b3104b0ac7fac
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Tue, Nov 1, 2011 at 8:43 AM, I=C3=B1aki Baz C=
astillo <span dir=3D"ltr">&lt;<a href=3D"mailto:ibc@aliax.net">ibc@aliax.ne=
t</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi, I&#39;m implementing SIP over WebSocket as I defined in:<br>
 =C2=A0<a href=3D"http://tools.ietf.org/html/draft-ibc-rtcweb-sip-websocket=
-00" target=3D"_blank">http://tools.ietf.org/html/draft-ibc-rtcweb-sip-webs=
ocket-00</a><br>
<br>
Initially I mandated WS frames of type UTF-8 (as SIP<br>
requests/responses use UTF-8 or ASCII) and I was happy. But now I&#39;ve<br=
>
realized that SIP protocol (RFC 3261), whose requests/responses are<br>
very similar to HTTP ones, allows binary bodies in certain cases.<br>
<br>
So now I must change the spec and mandate WS frames of type binary<br>
*just* for the case in which a JavaScript implementation of SIP over<br>
WebSocket receives a *valid* SIP request/response with binary body.<br>
<br>
It&#39;s clear for me that the WS frame encoding indication is a bad idea.<=
br>
IMHO the encoding should be defined by each WebSocket subprotocol by<br>
leaving the WS frame layer not aware of it.<font class=3D"Apple-style-span"=
 color=3D"#888888"><br></font></blockquote></div><br clear=3D"all"><div>If =
you are sending binary data, then you have to send it in a binary frame -- =
you can&#39;t pretend it is UTF8 text.</div>

<div><br></div><div>Having a separate text frame type was discussed over an=
d over on this group, including by you. =C2=A0Please accept the consensus r=
ather than continuing to argue against it.</div><div><br></div>-- <br>John =
A. Tamplin<br>

Software Engineer (GWT), Google<br>

--000e0cd5a184580b3104b0ac7fac--

From ibc@aliax.net  Tue Nov  1 06:52:36 2011
Return-Path: <ibc@aliax.net>
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 F2C5E11E819F for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 06:52:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.569
X-Spam-Level: 
X-Spam-Status: No, score=-2.569 tagged_above=-999 required=5 tests=[AWL=-0.044, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, SARE_SUB_ENC_UTF8=0.152]
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 CiUQ3GhAzuEN for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 06:52:35 -0700 (PDT)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by ietfa.amsl.com (Postfix) with ESMTP id 1048511E81A5 for <hybi@ietf.org>; Tue,  1 Nov 2011 06:52:34 -0700 (PDT)
Received: by vws5 with SMTP id 5so6874568vws.31 for <hybi@ietf.org>; Tue, 01 Nov 2011 06:52:34 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.70.98 with SMTP id l2mr8703074vdu.101.1320155554602; Tue, 01 Nov 2011 06:52:34 -0700 (PDT)
Received: by 10.220.184.6 with HTTP; Tue, 1 Nov 2011 06:52:34 -0700 (PDT)
In-Reply-To: <CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com>
References: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com> <CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com>
Date: Tue, 1 Nov 2011 14:52:34 +0100
Message-ID: <CALiegf=L62kmBszt8pkGbeeB+PgzKkoT2JxLTxJAgmrLyqLR6A@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
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: Tue, 01 Nov 2011 13:52:36 -0000

2011/11/1 John Tamplin <jat@google.com>:
> Having a separate text frame type was discussed over and over on this gro=
up,
> including by you. =C2=A0Please accept the consensus rather than continuin=
g to
> argue against it.

I know. I just meant that, given my current experience, I don't think
it's a good idea.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From jat@google.com  Tue Nov  1 07:20:06 2011
Return-Path: <jat@google.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 BCA1721F8E4F for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 07:20:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.562
X-Spam-Level: 
X-Spam-Status: No, score=-102.562 tagged_above=-999 required=5 tests=[AWL=-0.038, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, SARE_SUB_ENC_UTF8=0.152, 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 8ToGISeCSjGi for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 07:20:06 -0700 (PDT)
Received: from mail-gy0-f172.google.com (mail-gy0-f172.google.com [209.85.160.172]) by ietfa.amsl.com (Postfix) with ESMTP id 129DE21F8E4E for <hybi@ietf.org>; Tue,  1 Nov 2011 07:20:06 -0700 (PDT)
Received: by gyh20 with SMTP id 20so8505176gyh.31 for <hybi@ietf.org>; Tue, 01 Nov 2011 07:20:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-system-of-record; bh=SNyGlYwRGrpDtvqUil0+LzNr0wGRLZjQDqWqmGBNkTM=; b=H+y5PkHKQ6HptqWrBfYVquNt/VpU3p73QYng7PE8UcaPreslqbFfv599aL4qF95OvK XUs/S5H4U5vKZwv3Lz2w==
Received: by 10.150.139.9 with SMTP id m9mr659988ybd.104.1320157205242; Tue, 01 Nov 2011 07:20:05 -0700 (PDT)
Received: by 10.150.139.9 with SMTP id m9mr659975ybd.104.1320157205123; Tue, 01 Nov 2011 07:20:05 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.197.9 with HTTP; Tue, 1 Nov 2011 07:19:44 -0700 (PDT)
In-Reply-To: <CALiegf=L62kmBszt8pkGbeeB+PgzKkoT2JxLTxJAgmrLyqLR6A@mail.gmail.com>
References: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com> <CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com> <CALiegf=L62kmBszt8pkGbeeB+PgzKkoT2JxLTxJAgmrLyqLR6A@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Tue, 1 Nov 2011 10:19:44 -0400
Message-ID: <CABLsOLDnyESFBxE356yQEANS6dfGTL74pROmN1oeG9RdBi4P8Q@mail.gmail.com>
To: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
Content-Type: multipart/alternative; boundary=000e0cd56b1c4251e704b0ad0d34
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
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: Tue, 01 Nov 2011 14:20:06 -0000

--000e0cd56b1c4251e704b0ad0d34
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 1, 2011 at 9:52 AM, I=C3=B1aki Baz Castillo <ibc@aliax.net> wro=
te:

> I know. I just meant that, given my current experience, I don't think
> it's a good idea.


It seems really simple -- if you might need to send arbitrary binary data
in the layer on top of WebSockets, you use a WebSocket binary frame for it.
 If you only need text, you use a text frame and let the browser do the
conversion to its internal representation for you in native code rather
than JS.

--=20
John A. Tamplin
Software Engineer (GWT), Google

--000e0cd56b1c4251e704b0ad0d34
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Tue, Nov 1, 2011 at 9:52 AM, I=C3=B1aki Baz C=
astillo <span dir=3D"ltr">&lt;<a href=3D"mailto:ibc@aliax.net">ibc@aliax.ne=
t</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margi=
n:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I know. I just meant that, given my current experience, I don&#39;t think<b=
r>
it&#39;s a good idea.</blockquote></div><div><br></div>It seems really simp=
le -- if you might need to send arbitrary binary data in the layer on top o=
f WebSockets, you use a WebSocket binary frame for it. =C2=A0If you only ne=
ed text, you use a text frame and let the browser do the conversion to its =
internal representation for you in native code rather than JS.<br clear=3D"=
all">

<div><br></div>-- <br>John A. Tamplin<br>Software Engineer (GWT), Google<br=
>

--000e0cd56b1c4251e704b0ad0d34--

From ibc@aliax.net  Tue Nov  1 07:30:07 2011
Return-Path: <ibc@aliax.net>
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 BE4B911E80A1 for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 07:30:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.569
X-Spam-Level: 
X-Spam-Status: No, score=-2.569 tagged_above=-999 required=5 tests=[AWL=-0.044, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, SARE_SUB_ENC_UTF8=0.152]
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 5oED2QaARLT6 for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 07:30:07 -0700 (PDT)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by ietfa.amsl.com (Postfix) with ESMTP id 32A8E11E809C for <hybi@ietf.org>; Tue,  1 Nov 2011 07:30:07 -0700 (PDT)
Received: by vws5 with SMTP id 5so6922255vws.31 for <hybi@ietf.org>; Tue, 01 Nov 2011 07:30:06 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.240.145 with SMTP id wa17mr8928167vdc.118.1320157806717; Tue, 01 Nov 2011 07:30:06 -0700 (PDT)
Received: by 10.220.184.6 with HTTP; Tue, 1 Nov 2011 07:30:06 -0700 (PDT)
In-Reply-To: <CABLsOLDnyESFBxE356yQEANS6dfGTL74pROmN1oeG9RdBi4P8Q@mail.gmail.com>
References: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com> <CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com> <CALiegf=L62kmBszt8pkGbeeB+PgzKkoT2JxLTxJAgmrLyqLR6A@mail.gmail.com> <CABLsOLDnyESFBxE356yQEANS6dfGTL74pROmN1oeG9RdBi4P8Q@mail.gmail.com>
Date: Tue, 1 Nov 2011 15:30:06 +0100
Message-ID: <CALiegfmhR=unUKqiu_KiYgvV_AaJEUSJ_4KxwKhNX1qv1NuU+Q@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
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: Tue, 01 Nov 2011 14:30:07 -0000

2011/11/1 John Tamplin <jat@google.com>:
> It seems really simple -- if you might need to send arbitrary binary data=
 in
> the layer on top of WebSockets, you use a WebSocket binary frame for it. =
=C2=A0If
> you only need text, you use a text frame and let the browser do the
> conversion to its internal representation for you in native code rather t=
han
> JS.

The problem is that, in my case, 99.9999% of WebSocket messages my JS
will receive contain UTF-8 text, but I must be ready to receive
binary.
The server is just a SIP proxy and it does not inspect the message in
order to deliver it within utf-8 frames or binary frames, so it must
always use binary frames.

The JL client does a message parsing when a WS message is received.
Since this WS message must be binary I need convert it into a String
before parsing it, and AFAIK ArrayBuffer to String is not
straightforward in JavaScript.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From jat@google.com  Tue Nov  1 07:51:22 2011
Return-Path: <jat@google.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 6B84811E81AA for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 07:51:22 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.549
X-Spam-Level: 
X-Spam-Status: No, score=-102.549 tagged_above=-999 required=5 tests=[AWL=-0.025, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, SARE_SUB_ENC_UTF8=0.152, 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 1bKMw010inXX for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 07:51:21 -0700 (PDT)
Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by ietfa.amsl.com (Postfix) with ESMTP id AE92311E81A2 for <hybi@ietf.org>; Tue,  1 Nov 2011 07:51:21 -0700 (PDT)
Received: by ywt2 with SMTP id 2so8502100ywt.31 for <hybi@ietf.org>; Tue, 01 Nov 2011 07:51:21 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-system-of-record; bh=DBRby0bquaO1bdmWJQ0wx03mVJ2cIgL+tyT5cdZjkGU=; b=VFIDRADBFX6DueC7wG1lwxfyNaeYj7vgUwjVWo16goI9pVSvX9pXQmC0r4IKVdpBKI 59EShHCGhhDa0hMKI9xQ==
Received: by 10.151.78.3 with SMTP id f3mr884303ybl.59.1320159081261; Tue, 01 Nov 2011 07:51:21 -0700 (PDT)
Received: by 10.151.78.3 with SMTP id f3mr884288ybl.59.1320159081133; Tue, 01 Nov 2011 07:51:21 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.197.9 with HTTP; Tue, 1 Nov 2011 07:51:00 -0700 (PDT)
In-Reply-To: <CALiegfmhR=unUKqiu_KiYgvV_AaJEUSJ_4KxwKhNX1qv1NuU+Q@mail.gmail.com>
References: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com> <CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com> <CALiegf=L62kmBszt8pkGbeeB+PgzKkoT2JxLTxJAgmrLyqLR6A@mail.gmail.com> <CABLsOLDnyESFBxE356yQEANS6dfGTL74pROmN1oeG9RdBi4P8Q@mail.gmail.com> <CALiegfmhR=unUKqiu_KiYgvV_AaJEUSJ_4KxwKhNX1qv1NuU+Q@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Tue, 1 Nov 2011 10:51:00 -0400
Message-ID: <CABLsOLDvJ8dFf-7-65YLKTeb4TMDuk+L7x7kwihKaNs_2T45dg@mail.gmail.com>
To: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
Content-Type: multipart/alternative; boundary=0015174bed7a13f7ae04b0ad7d57
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
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: Tue, 01 Nov 2011 14:51:22 -0000

--0015174bed7a13f7ae04b0ad7d57
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Tue, Nov 1, 2011 at 10:30 AM, I=C3=B1aki Baz Castillo <ibc@aliax.net> wr=
ote:

> Since this WS message must be binary I need convert it into a String
> before parsing it, and AFAIK ArrayBuffer to String is not
> straightforward in JavaScript.


Right, which is *exactly* why there is a text frame type in the first
place.  You are suggesting inflicting that pain on everyone by having only
binary frames, when the 99% use case is going to be exchanging something
like JSON.

An alternative you might consider is allowing pure-text frames to be sent
as text, and then sending binary data in binary frames.  You know, what
they were intended for.

--=20
John A. Tamplin
Software Engineer (GWT), Google

--0015174bed7a13f7ae04b0ad7d57
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Tue, Nov 1, 2011 at 10:30 AM, I=C3=B1aki Baz =
Castillo <span dir=3D"ltr">&lt;<a href=3D"mailto:ibc@aliax.net">ibc@aliax.n=
et</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"marg=
in:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Since this WS message must be binary I need convert it into a String<br>
before parsing it, and AFAIK ArrayBuffer to String is not<br>
straightforward in JavaScript.</blockquote><div><br></div><div>Right, which=
 is *exactly* why there is a text frame type in the first place. =C2=A0You =
are suggesting inflicting that pain on everyone by having only binary frame=
s, when the 99% use case is going to be exchanging something like JSON.</di=
v>

<div><br></div><div>An alternative you might consider is allowing pure-text=
 frames to be sent as text, and then sending binary data in binary frames. =
=C2=A0You know, what they were intended for.=C2=A0</div></div><div><br></di=
v>-- <br>

John A. Tamplin<br>Software Engineer (GWT), Google<br>

--0015174bed7a13f7ae04b0ad7d57--

From ibc@aliax.net  Tue Nov  1 07:59:54 2011
Return-Path: <ibc@aliax.net>
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 C63A711E812E for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 07:59:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.569
X-Spam-Level: 
X-Spam-Status: No, score=-2.569 tagged_above=-999 required=5 tests=[AWL=-0.044, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, SARE_SUB_ENC_UTF8=0.152]
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 4TZUriBWP90c for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 07:59:54 -0700 (PDT)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id BE04A11E81BC for <hybi@ietf.org>; Tue,  1 Nov 2011 07:59:33 -0700 (PDT)
Received: by vcbfo1 with SMTP id fo1so6941952vcb.31 for <hybi@ietf.org>; Tue, 01 Nov 2011 07:59:32 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.240.145 with SMTP id wa17mr9042268vdc.118.1320159572795; Tue, 01 Nov 2011 07:59:32 -0700 (PDT)
Received: by 10.220.184.6 with HTTP; Tue, 1 Nov 2011 07:59:32 -0700 (PDT)
In-Reply-To: <CABLsOLDvJ8dFf-7-65YLKTeb4TMDuk+L7x7kwihKaNs_2T45dg@mail.gmail.com>
References: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com> <CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com> <CALiegf=L62kmBszt8pkGbeeB+PgzKkoT2JxLTxJAgmrLyqLR6A@mail.gmail.com> <CABLsOLDnyESFBxE356yQEANS6dfGTL74pROmN1oeG9RdBi4P8Q@mail.gmail.com> <CALiegfmhR=unUKqiu_KiYgvV_AaJEUSJ_4KxwKhNX1qv1NuU+Q@mail.gmail.com> <CABLsOLDvJ8dFf-7-65YLKTeb4TMDuk+L7x7kwihKaNs_2T45dg@mail.gmail.com>
Date: Tue, 1 Nov 2011 15:59:32 +0100
Message-ID: <CALiegf=-c795zSSJkZj+6gfFUqaTi=BC0VhBv8p-9fGBhKN4Dw@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
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: Tue, 01 Nov 2011 14:59:54 -0000

2011/11/1 John Tamplin <jat@google.com>:
> On Tue, Nov 1, 2011 at 10:30 AM, I=C3=B1aki Baz Castillo <ibc@aliax.net> =
wrote:
>>
>> Since this WS message must be binary I need convert it into a String
>> before parsing it, and AFAIK ArrayBuffer to String is not
>> straightforward in JavaScript.
>
> Right, which is *exactly* why there is a text frame type in the first pla=
ce.
> =C2=A0You are suggesting inflicting that pain on everyone by having only =
binary
> frames, when the 99% use case is going to be exchanging something like JS=
ON.
> An alternative you might consider is allowing pure-text frames to be sent=
 as
> text, and then sending binary data in binary frames. =C2=A0You know, what=
 they
> were intended for.

That would require my WebSocket server to inspect incoming SIP
messages having as destination a WebSocket client. It must check
whether the SIP message contains (or not) pure UTF-8 data and send it
in WS utf-8 frames or binay. It would be not so hard.

Thanks.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From jmason@rim.com  Tue Nov  1 08:48:04 2011
Return-Path: <jmason@rim.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 0984211E815C for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 08:48:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.675
X-Spam-Level: 
X-Spam-Status: No, score=-5.675 tagged_above=-999 required=5 tests=[AWL=0.472,  BAYES_00=-2.599, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_MED=-4, SARE_SUB_ENC_UTF8=0.152]
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 5OaoNWLAg2JQ for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 08:48:03 -0700 (PDT)
Received: from mhs060cnc.rim.net (mhs060cnc.rim.net [208.65.73.34]) by ietfa.amsl.com (Postfix) with ESMTP id B0CA211E8138 for <hybi@ietf.org>; Tue,  1 Nov 2011 08:48:02 -0700 (PDT)
X-AuditID: 0a41282f-b7b05ae00000799c-4f-4eb01494a749
Received: from XHT107CNC.rim.net (xht107cnc.rim.net [10.65.12.217]) (using TLS with cipher AES128-SHA (AES128-SHA/128 bits)) (Client did not present a certificate) by mhs060cnc.rim.net (SBG) with SMTP id B1.09.31132.49410BE4; Tue,  1 Nov 2011 15:47:32 +0000 (GMT)
Received: from XCH117CNC.rim.net ([fe80::a136:e723:2796:5b59]) by XHT107CNC.rim.net ([fe80::5db:5632:3d0b:13ed%11]) with mapi; Tue, 1 Nov 2011 11:47:32 -0400
From: Joe Mason <jmason@rim.com>
To: =?utf-8?B?ScOxYWtpIEJheiBDYXN0aWxsbw==?= <ibc@aliax.net>, John Tamplin <jat@google.com>
Date: Tue, 1 Nov 2011 11:47:29 -0400
Thread-Topic: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
Thread-Index: AcyYosOY9/CC44iaQHq4ke8ul/gldAACrAkg
Message-ID: <BB31C4AB95A70042A256109D461991260C0408CA@XCH117CNC.rim.net>
References: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com> <CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com> <CALiegf=L62kmBszt8pkGbeeB+PgzKkoT2JxLTxJAgmrLyqLR6A@mail.gmail.com> <CABLsOLDnyESFBxE356yQEANS6dfGTL74pROmN1oeG9RdBi4P8Q@mail.gmail.com> <CALiegfmhR=unUKqiu_KiYgvV_AaJEUSJ_4KxwKhNX1qv1NuU+Q@mail.gmail.com>
In-Reply-To: <CALiegfmhR=unUKqiu_KiYgvV_AaJEUSJ_4KxwKhNX1qv1NuU+Q@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
content-transfer-encoding: base64
MIME-Version: 1.0
X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrAKsWRmVeSWpSXmKPExsXC5chzU3eKyAY/gx8PpS3ev9zGZDF9n43F 00kH2B2YPc41vGf3WLCp1GPJkp9MAcxRDYw2iXl5+SWJJakKKanFybZKPqnpiTkKAUWZZYnJ lQoumcXJOYmZualFSgqZKbZKJkoKBTmJyam5qXkltkqJBQWpeSlKdlwKGMAGqCwzTyE1Lzk/ JTMv3VbJM9hf18LC1FLXUMlOFwkk/OPOmDNxMmPBE9aKL7OOMjYwXmDtYuTkkBAwkVj+9RYT hC0mceHeerYuRi4OIYFeJon7u9YxQzgLGSWu/pgD1sEmoCDx+fADoA4ODhGBWIkDS4RAwswC yhJXj61gAbFZBFQkGv5fZgexhQVCJK5+/gcWFxEIlXj2ZQOUbSTRP2E7mM0r4CHR8nAuE8Su N0wSL370g13EKRAoMfXKC7BBjEDXfT+1hglimbjErSfzoa4WkFiy5zwzhC0q8fLxP1aIelGJ O+3rGUHuZBbQlFi/Sx+iVVFiSvdDdoi9ghInZz5hmcAoNgvJ1FkIHbOQdMxC0rGAkWUVo2Bu RrGBmUFyXrJeUWauXl5qySZGcNLQ0N/B2LdX6xCjAAejEg+vCccGPyHWxLLiytxDjBIczEoi vP7L1vkJ8aYkVlalFuXHF5XmpBYfYrQABtxEZinu5HxgQssriTc2MEDhKInz8l7K8BMSSAem o+zU1ILUIphWJg5OqQbGpdYR1dU3rTcG8u/5Iaffb1gzebpXyKE3nFZv1e/8YpcUZOgSEE56 ZrZAdUW1/KJFiypb832u2/Z0H1txXZudXUN99VrGA/7WxxMElx9fzfPnvl2vwHwhNkFbbofo RscEyejHMtkHSw/d+TZ9Lv/Z7sls3jyf8ir/Z98/U3Ljs/2nnXt5qiSVWIozEg21mIuKEwE4 Zil7MwMAAA==
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Now from the experience: utf-8/binary frame type is a	BAD idea
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: Tue, 01 Nov 2011 15:48:04 -0000

PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBoeWJpLWJvdW5jZXNAaWV0
Zi5vcmcgW21haWx0bzpoeWJpLWJvdW5jZXNAaWV0Zi5vcmddIE9uIEJlaGFsZiBPZg0KPiBJ
w7Fha2kgQmF6IENhc3RpbGxvDQo+IA0KPiBUaGUgcHJvYmxlbSBpcyB0aGF0LCBpbiBteSBj
YXNlLCA5OS45OTk5JSBvZiBXZWJTb2NrZXQgbWVzc2FnZXMgbXkgSlMNCj4gd2lsbCByZWNl
aXZlIGNvbnRhaW4gVVRGLTggdGV4dCwgYnV0IEkgbXVzdCBiZSByZWFkeSB0byByZWNlaXZl
DQo+IGJpbmFyeS4NCj4gVGhlIHNlcnZlciBpcyBqdXN0IGEgU0lQIHByb3h5IGFuZCBpdCBk
b2VzIG5vdCBpbnNwZWN0IHRoZSBtZXNzYWdlIGluDQo+IG9yZGVyIHRvIGRlbGl2ZXIgaXQg
d2l0aGluIHV0Zi04IGZyYW1lcyBvciBiaW5hcnkgZnJhbWVzLCBzbyBpdCBtdXN0DQo+IGFs
d2F5cyB1c2UgYmluYXJ5IGZyYW1lcy4NCg0KU291bmRzIGxpa2UgeW91J3JlIGNvbXBsYWlu
aW5nIGFib3V0IHRoZSBkZXNpZ24gb2YgU0lQLCBub3QgV2ViU29ja2V0cy4NCg0KSm9lDQoN
Ci0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
LS0tLS0tLS0tLS0tLS0tLQ0KVGhpcyB0cmFuc21pc3Npb24gKGluY2x1ZGluZyBhbnkgYXR0
YWNobWVudHMpIG1heSBjb250YWluIGNvbmZpZGVudGlhbCBpbmZvcm1hdGlvbiwgcHJpdmls
ZWdlZCBtYXRlcmlhbCAoaW5jbHVkaW5nIG1hdGVyaWFsIHByb3RlY3RlZCBieSB0aGUgc29s
aWNpdG9yLWNsaWVudCBvciBvdGhlciBhcHBsaWNhYmxlIHByaXZpbGVnZXMpLCBvciBjb25z
dGl0dXRlIG5vbi1wdWJsaWMgaW5mb3JtYXRpb24uIEFueSB1c2Ugb2YgdGhpcyBpbmZvcm1h
dGlvbiBieSBhbnlvbmUgb3RoZXIgdGhhbiB0aGUgaW50ZW5kZWQgcmVjaXBpZW50IGlzIHBy
b2hpYml0ZWQuIElmIHlvdSBoYXZlIHJlY2VpdmVkIHRoaXMgdHJhbnNtaXNzaW9uIGluIGVy
cm9yLCBwbGVhc2UgaW1tZWRpYXRlbHkgcmVwbHkgdG8gdGhlIHNlbmRlciBhbmQgZGVsZXRl
IHRoaXMgaW5mb3JtYXRpb24gZnJvbSB5b3VyIHN5c3RlbS4gVXNlLCBkaXNzZW1pbmF0aW9u
LCBkaXN0cmlidXRpb24sIG9yIHJlcHJvZHVjdGlvbiBvZiB0aGlzIHRyYW5zbWlzc2lvbiBi
eSB1bmludGVuZGVkIHJlY2lwaWVudHMgaXMgbm90IGF1dGhvcml6ZWQgYW5kIG1heSBiZSB1
bmxhd2Z1bC4NCg==

From petithug@acm.org  Tue Nov  1 13:21:32 2011
Return-Path: <petithug@acm.org>
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 D8F5E11E80B7 for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 13:21:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.55
X-Spam-Level: 
X-Spam-Status: No, score=-102.55 tagged_above=-999 required=5 tests=[AWL=0.050, BAYES_00=-2.599, NO_RELAYS=-0.001, 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 cOg8cK978pjz for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 13:21:32 -0700 (PDT)
Received: from implementers.org (implementers.org [IPv6:2604:3400:dc1:41:216:3eff:fe5b:8240]) by ietfa.amsl.com (Postfix) with ESMTP id 2887311E808C for <hybi@ietf.org>; Tue,  1 Nov 2011 13:21:32 -0700 (PDT)
Received: from [IPv6:2001:470:1f05:616:213:d4ff:fe04:3e08] (shalmaneser.org [IPv6:2001:470:1f05:616:213:d4ff:fe04:3e08]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client CN "petithug", Issuer "implementers.org" (verified OK)) by implementers.org (Postfix) with ESMTPS id AA2B3204AD for <hybi@ietf.org>; Tue,  1 Nov 2011 20:12:42 +0000 (UTC)
Message-ID: <4EB054C7.2090209@acm.org>
Date: Tue, 01 Nov 2011 13:21:27 -0700
From: Marc Petit-Huguenin <petithug@acm.org>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20111010 Iceowl/1.0b2 Icedove/3.1.15
MIME-Version: 1.0
To: hybi@ietf.org
X-Enigmail-Version: 1.1.2
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Mailman-Approved-At: Tue, 01 Nov 2011 13:26:44 -0700
Subject: [hybi] Wireshark dissector for Websocket
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: Tue, 01 Nov 2011 20:21:33 -0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is there anyone currently developing a Wireshark dissector for Websocket?

Please CC me on the response.

Thanks.

- -- 
Marc Petit-Huguenin
Personal email: marc@petit-huguenin.org
Professional email: petithug@acm.org
Blog: http://blog.marc.petit-huguenin.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iEYEARECAAYFAk6wVMMACgkQ9RoMZyVa61cq8ACfdEiWsvB4zlUisobz/7WoxR8/
bhQAn2W5Ha8Y6B7ODN9bNzam/iTDJkYD
=5MMv
-----END PGP SIGNATURE-----

From duerst@it.aoyama.ac.jp  Tue Nov  1 18:15:56 2011
Return-Path: <duerst@it.aoyama.ac.jp>
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 E190E1F0C6E for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 18:15:56 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -99.4
X-Spam-Level: 
X-Spam-Status: No, score=-99.4 tagged_above=-999 required=5 tests=[AWL=0.238,  BAYES_00=-2.599, HELO_EQ_JP=1.244, HOST_EQ_JP=1.265, MIME_8BIT_HEADER=0.3, SARE_SUB_ENC_UTF8=0.152, 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 3P-f4VZDpQ17 for <hybi@ietfa.amsl.com>; Tue,  1 Nov 2011 18:15:56 -0700 (PDT)
Received: from scintmta02.scbb.aoyama.ac.jp (scintmta02.scbb.aoyama.ac.jp [133.2.253.34]) by ietfa.amsl.com (Postfix) with ESMTP id 476C21F0C6C for <hybi@ietf.org>; Tue,  1 Nov 2011 18:15:55 -0700 (PDT)
Received: from scmse02.scbb.aoyama.ac.jp ([133.2.253.231]) by scintmta02.scbb.aoyama.ac.jp (secret/secret) with SMTP id pA21Ffaf009807 for <hybi@ietf.org>; Wed, 2 Nov 2011 10:15:45 +0900
Received: from (unknown [133.2.206.133]) by scmse02.scbb.aoyama.ac.jp with smtp id 54a0_3918_2e860910_04f0_11e1_81ec_001d096c5782; Wed, 02 Nov 2011 10:15:41 +0900
Received: from [IPv6:::1] ([133.2.210.1]:56792) by itmail.it.aoyama.ac.jp with [XMail 1.22 ESMTP Server] id <S156727D> for <hybi@ietf.org> from <duerst@it.aoyama.ac.jp>; Wed, 2 Nov 2011 10:15:45 +0900
Message-ID: <4EB099B4.6030304@it.aoyama.ac.jp>
Date: Wed, 02 Nov 2011 10:15:32 +0900
From: =?UTF-8?B?Ik1hcnRpbiBKLiBEw7xyc3Qi?= <duerst@it.aoyama.ac.jp>
Organization: Aoyama Gakuin University
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100722 Eudora/3.0.4
MIME-Version: 1.0
To: =?UTF-8?B?ScOxYWtpIEJheiBDYXN0aWxsbw==?= <ibc@aliax.net>
References: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com>	<CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com>	<CALiegf=L62kmBszt8pkGbeeB+PgzKkoT2JxLTxJAgmrLyqLR6A@mail.gmail.com>	<CABLsOLDnyESFBxE356yQEANS6dfGTL74pROmN1oeG9RdBi4P8Q@mail.gmail.com>	<CALiegfmhR=unUKqiu_KiYgvV_AaJEUSJ_4KxwKhNX1qv1NuU+Q@mail.gmail.com>	<CABLsOLDvJ8dFf-7-65YLKTeb4TMDuk+L7x7kwihKaNs_2T45dg@mail.gmail.com> <CALiegf=-c795zSSJkZj+6gfFUqaTi=BC0VhBv8p-9fGBhKN4Dw@mail.gmail.com>
In-Reply-To: <CALiegf=-c795zSSJkZj+6gfFUqaTi=BC0VhBv8p-9fGBhKN4Dw@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Cc: hybi@ietf.org
Subject: Re: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
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, 02 Nov 2011 01:15:57 -0000

On 2011/11/01 23:59, IÃ±aki Baz Castillo wrote:

> That would require my WebSocket server to inspect incoming SIP
> messages having as destination a WebSocket client. It must check
> whether the SIP message contains (or not) pure UTF-8 data and send it
> in WS utf-8 frames or binay. It would be not so hard.

Then I think you should do it. I know almost nothing about SIP, but I 
guess you can also make headers and body two separate messages, and can 
always use UTF-8 for the headers, and only check the bodies (or maybe 
only a subset of bodies, because the headers may tell you whether 
there's (a chance of) binary.

Anyway, I don't think it's WebSockets' fault, and I don't think it's 
SIPs fault, but when gatewaying from one protocol to another, some work 
may be needed in the areas where these protocols use different concepts.

Regards,    Martin.

From ibc@aliax.net  Wed Nov  2 01:45:03 2011
Return-Path: <ibc@aliax.net>
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 B888411E8088 for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 01:45:03 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.567
X-Spam-Level: 
X-Spam-Status: No, score=-2.567 tagged_above=-999 required=5 tests=[AWL=-0.042, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, SARE_SUB_ENC_UTF8=0.152]
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 na3TPKOehyPm for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 01:45:03 -0700 (PDT)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id 2B57611E80AC for <hybi@ietf.org>; Wed,  2 Nov 2011 01:45:02 -0700 (PDT)
Received: by vcbfl11 with SMTP id fl11so603082vcb.31 for <hybi@ietf.org>; Wed, 02 Nov 2011 01:45:01 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.35.70 with SMTP id f6mr3436247vdj.84.1320223501424; Wed, 02 Nov 2011 01:45:01 -0700 (PDT)
Received: by 10.220.184.6 with HTTP; Wed, 2 Nov 2011 01:45:01 -0700 (PDT)
In-Reply-To: <4EB099B4.6030304@it.aoyama.ac.jp>
References: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com> <CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com> <CALiegf=L62kmBszt8pkGbeeB+PgzKkoT2JxLTxJAgmrLyqLR6A@mail.gmail.com> <CABLsOLDnyESFBxE356yQEANS6dfGTL74pROmN1oeG9RdBi4P8Q@mail.gmail.com> <CALiegfmhR=unUKqiu_KiYgvV_AaJEUSJ_4KxwKhNX1qv1NuU+Q@mail.gmail.com> <CABLsOLDvJ8dFf-7-65YLKTeb4TMDuk+L7x7kwihKaNs_2T45dg@mail.gmail.com> <CALiegf=-c795zSSJkZj+6gfFUqaTi=BC0VhBv8p-9fGBhKN4Dw@mail.gmail.com> <4EB099B4.6030304@it.aoyama.ac.jp>
Date: Wed, 2 Nov 2011 09:45:01 +0100
Message-ID: <CALiegfnDZy51AqGrj5m+Ch9x5jSWx4veg3nAJtYh7ZPD7CMU9Q@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: =?UTF-8?Q?Martin_J=2E_D=C3=BCrst?= <duerst@it.aoyama.ac.jp>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
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, 02 Nov 2011 08:45:03 -0000

2011/11/2 "Martin J. D=C3=BCrst" <duerst@it.aoyama.ac.jp>:
> On 2011/11/01 23:59, I=C3=B1aki Baz Castillo wrote:
>
>> That would require my WebSocket server to inspect incoming SIP
>> messages having as destination a WebSocket client. It must check
>> whether the SIP message contains (or not) pure UTF-8 data and send it
>> in WS utf-8 frames or binay. It would be not so hard.
>
> Then I think you should do it. I know almost nothing about SIP, but I gue=
ss
> you can also make headers and body two separate messages, and can always =
use
> UTF-8 for the headers, and only check the bodies (or maybe only a subset =
of
> bodies, because the headers may tell you whether there's (a chance of)
> binary.

Well, IMHO it would make things more complex. But indeed could be a solutio=
n.


> Anyway, I don't think it's WebSockets' fault, and I don't think it's SIPs
> fault

I don't agree. There is nothing wrong in allowing a signaling protocol
to carry both text and binary bodies. This is not a problem for common
SIP clients.

IMHO the WS frame type is something a bit artificial which just fits
well with JavaScrtip given JavaScript limitations (converting from
ArrayBuffer to String is hard).

Regards.




--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From arman@noemax.com  Wed Nov  2 02:55:50 2011
Return-Path: <arman@noemax.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 91ABF11E8145 for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 02:55:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.74
X-Spam-Level: 
X-Spam-Status: No, score=-0.74 tagged_above=-999 required=5 tests=[BAYES_20=-0.74]
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 Nz8dww1QLKsj for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 02:55:50 -0700 (PDT)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by ietfa.amsl.com (Postfix) with ESMTP id D682C11E8142 for <hybi@ietf.org>; Wed,  2 Nov 2011 02:55:49 -0700 (PDT)
Received: from ArmanLaptop by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id LUF03946 for <hybi@ietf.org>; Wed, 02 Nov 2011 11:55:46 +0200
From: "Arman Djusupov" <arman@noemax.com>
To: <hybi@ietf.org>
Date: Wed, 2 Nov 2011 11:55:40 +0200
Message-ID: <002201cc9945$98696960$c93c3c20$@noemax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
thread-index: AcyZRL9xFidQhQr5QRye+iugv0M/vA==
Content-Language: en-us
Subject: [hybi]  Testsuite update case 7.1.5
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, 02 Nov 2011 09:55:50 -0000

Hello list, hello Tobias,

I would like to discuss Autobahn's 7.1.5 test case:

Case Description
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Send message fragment1 followed by close then fragment

Case Expectation

Clean close with normal code.

Case Outcome

The close code should have been 1000 or empty

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

Since the close frame is received prior to the final frame of the =
inbound message, our implementation considers that the partially =
received message is being interrupted and that this is an abnormal =
closure, so it sends close code 1006. I consider this as being the =
correct behavior since the message should be terminated with a final =
frame in order to consider the closure as being graceful. The WebSocket =
implementation should not send any frame after the close frame, so the =
sender behavior is also invalid (since in this test case sender does =
send a frame after the close frame).

Is there any reason why the close frame with status code 1000-OK must be =
echoed back in order to receive a "Pass" in this particular test? The =
specification states "(When sending a Close frame in response the =
endpoint  *typically* echos the status code it received.)". The term =
"typically" in this context, does not mean MUST or even SHOULD. In given =
circumstances when the receiver encounters an error condition due to a =
partially received message, I believe the receiver SHOULD send the =
status code 1006  to indicate that the connection wasn't closed =
gracefully on the receiving side.

With best regards,
Arman


From webmaster@zaphoyd.com  Wed Nov  2 04:32:37 2011
Return-Path: <webmaster@zaphoyd.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 74FA411E815C for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 04:32:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.308
X-Spam-Level: 
X-Spam-Status: No, score=-1.308 tagged_above=-999 required=5 tests=[AWL=-0.105, BAYES_00=-2.599, MIME_QP_LONG_LINE=1.396]
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 aCeb85QMc6Rz for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 04:32:37 -0700 (PDT)
Received: from sh78.surpasshosting.com (sh78.surpasshosting.com [72.29.64.142]) by ietfa.amsl.com (Postfix) with ESMTP id D21DD11E808A for <hybi@ietf.org>; Wed,  2 Nov 2011 04:32:36 -0700 (PDT)
Received: from c-68-51-77-246.hsd1.il.comcast.net ([68.51.77.246]:47292 helo=[10.0.1.3]) by sh78.surpasshosting.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from <webmaster@zaphoyd.com>) id 1RLZ3X-0004dE-Jo; Wed, 02 Nov 2011 07:32:32 -0400
References: <002201cc9945$98696960$c93c3c20$@noemax.com>
In-Reply-To: <002201cc9945$98696960$c93c3c20$@noemax.com>
Mime-Version: 1.0 (1.0)
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=us-ascii
Message-Id: <4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com>
X-Mailer: iPad Mail (9A334)
From: Peter Thorson <webmaster@zaphoyd.com>
Date: Wed, 2 Nov 2011 06:32:30 -0500
To: Arman Djusupov <arman@noemax.com>
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - sh78.surpasshosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - zaphoyd.com
X-Source: 
X-Source-Args: 
X-Source-Dir: 
Cc: "<hybi@ietf.org>" <hybi@ietf.org>
Subject: Re: [hybi] Testsuite update case 7.1.5
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, 02 Nov 2011 11:32:37 -0000

On Nov 2, 2011, at 4:55, "Arman Djusupov" <arman@noemax.com> wrote:

> Hello list, hello Tobias,
>=20
> I would like to discuss Autobahn's 7.1.5 test case:
>=20
> Case Description
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> Send message fragment1 followed by close then fragment
>=20
> Case Expectation
>=20
> Clean close with normal code.
>=20
> Case Outcome
>=20
> The close code should have been 1000 or empty
>=20
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
>=20
> Since the close frame is received prior to the final frame of the inbound m=
essage, our implementation considers that the partially received message is b=
eing interrupted and that this is an abnormal closure, so it sends close cod=
e 1006. I consider this as being the correct behavior since the message shou=
ld be terminated with a final frame in order to consider the closure as bein=
g graceful. The WebSocket implementation should not send any frame after the=
 close frame, so the sender behavior is also invalid (since in this test cas=
e sender does send a frame after the close frame).
>=20
> Is there any reason why the close frame with status code 1000-OK must be e=
choed back in order to receive a "Pass" in this particular test? The specifi=
cation states "(When sending a Close frame in response the endpoint  *typica=
lly* echos the status code it received.)". The term "typically" in this cont=
ext, does not mean MUST or even SHOULD. In given circumstances when the rece=
iver encounters an error condition due to a partially received message, I be=
lieve the receiver SHOULD send the status code 1006  to indicate that the co=
nnection wasn't closed gracefully on the receiving side.
>=20
> With best regards,
> Arman

Hi Arman,

I'll take this question as I wrote most of the 7.x tests.=20

There is nothing in the websocket spec that indicates that closing the conne=
ction while a message has been partially sent should be considered a protoco=
l violation. Question for the list: Should there be?

In my opinion... The sender of a close frame will know that it has a message=
 in flight and can choose to finish sending that or close immediately. As su=
ch, I would interpret getting a close frame in the middle of a fragmented me=
ssage as a deliberate act on the part of the sender (as opposed to an unrela=
ted interruption) that closing now is more important than finishing the mess=
age. As such if that close frame offers a normal close I think the correct t=
hing to do is to cancel the partial message and close normally.

Regarding the fact that and endpoint must not send frames after a close.. Th=
is test violates that rule in order to test the expected response behavior, w=
hich the spec says is to ignore all bytes after a close frame. I am interpre=
ting that to mean that stray bytes after a close should be ignored and not c=
onsidered a protocol error.

Regarding sending 1006. The spec specifically says that codes 1005 and 1006 a=
re NOT to be used on the wire in any case. A 1006 is intended to be delivere=
d to the end application in the case where the connection was terminated wit=
h no closing handshake at all. If there were language in the spec preventing=
 closes in the middle of fragmented messages I would return a 1002/protocol e=
rror.

Best,

Peter=

From ibc@aliax.net  Wed Nov  2 04:40:17 2011
Return-Path: <ibc@aliax.net>
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 74D5211E808A for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 04:40:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.643
X-Spam-Level: 
X-Spam-Status: No, score=-2.643 tagged_above=-999 required=5 tests=[AWL=0.034,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 qzakqi4+OL4e for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 04:40:17 -0700 (PDT)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by ietfa.amsl.com (Postfix) with ESMTP id D1A3B11E8083 for <hybi@ietf.org>; Wed,  2 Nov 2011 04:40:16 -0700 (PDT)
Received: by vws5 with SMTP id 5so34699vws.31 for <hybi@ietf.org>; Wed, 02 Nov 2011 04:40:16 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.35.70 with SMTP id f6mr4039950vdj.84.1320234016253; Wed, 02 Nov 2011 04:40:16 -0700 (PDT)
Received: by 10.220.184.6 with HTTP; Wed, 2 Nov 2011 04:40:16 -0700 (PDT)
In-Reply-To: <4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com>
References: <002201cc9945$98696960$c93c3c20$@noemax.com> <4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com>
Date: Wed, 2 Nov 2011 12:40:16 +0100
Message-ID: <CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Peter Thorson <webmaster@zaphoyd.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: "<hybi@ietf.org>" <hybi@ietf.org>
Subject: Re: [hybi] Testsuite update case 7.1.5
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, 02 Nov 2011 11:40:17 -0000

2011/11/2 Peter Thorson <webmaster@zaphoyd.com>:
> There is nothing in the websocket spec that indicates that closing the co=
nnection while a message has been partially sent should be considered a pro=
tocol violation. Question for the list: Should there be?

IMHO not. I see a use case:

- I'm sending to the server a ISO image (800MB) by splitting the file
into multiple WS frames. It would take 120 minutes to upload the
entire WS message.

- After 5 minutes I must go out and close the cmoputer, so I press
"logout" in the web and the WS connection is closed by me (because I
must go out right now).


This is not a protocol error at all. This is a valid use case. Upon
receipt of the close frame, the server must discard all the partial
frames received, of course. But that is not an error.

So IMHO test 7.1.5 is correct (and this is what I implement).

Regards.


--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From arman@noemax.com  Wed Nov  2 06:25:45 2011
Return-Path: <arman@noemax.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 6AEA211E8089 for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 06:25:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.52
X-Spam-Level: 
X-Spam-Status: No, score=-1.52 tagged_above=-999 required=5 tests=[AWL=0.779,  BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
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 9Lu4hws5xAoL for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 06:25:44 -0700 (PDT)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by ietfa.amsl.com (Postfix) with ESMTP id 99D9C1F0C65 for <hybi@ietf.org>; Wed,  2 Nov 2011 06:25:44 -0700 (PDT)
Received: from ArmanLaptop by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id LYB47640; Wed, 02 Nov 2011 15:25:40 +0200
From: "Arman Djusupov" <arman@noemax.com>
To: =?UTF-8?Q?'I=C3=B1aki_Baz_Castillo'?= <ibc@aliax.net>, "'Peter Thorson'" <webmaster@zaphoyd.com>
References: <002201cc9945$98696960$c93c3c20$@noemax.com>	<4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com> <CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com>
In-Reply-To: <CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com>
Date: Wed, 2 Nov 2011 15:25:34 +0200
Message-ID: <002701cc9962$eb8776b0$c2966410$@noemax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
thread-index: AQH2ByfKsUFABchpiUfiw5MkelvqlgHOUuMiArZLHcWVIpDY4A==
Content-Language: en-us
Cc: hybi@ietf.org
Subject: Re: [hybi] Testsuite update case 7.1.5
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, 02 Nov 2011 13:25:45 -0000

> 2011/11/2 Peter Thorson <webmaster@zaphoyd.com>:
> > There is nothing in the websocket spec that indicates that closing=20
> > the
> connection while a message has been partially sent should be=20
> considered a protocol violation. Question for the list: Should there =
be?
>=20
> IMHO not. I see a use case:
>=20
> - I'm sending to the server a ISO image (800MB) by splitting the file=20
> into multiple WS frames. It would take 120 minutes to upload the=20
> entire WS message.
=20
Understood. However we are discussing a fragmented message, where the =
message might have already started being processed and the server might =
have allocated resources and threads for processing the message. This is =
the process that is getting interrupted by a close frame.

Imagine the content being sent to be an 800MB XML dataset which is =
getting committed to the database. If such a message gets interrupt then =
the server will have an error condition that requires it to roll back =
the entire transaction. The server should reply with a status code that =
clearly indicates that this connection closure was not graceful so that =
the client realizes that the connection closure caused problems to the =
server side. In my view you cannot refer to this as being a "graceful" =
closure when the server has to recover from the error state.

A graceful closure should be mutually graceful, otherwise it isn't =
graceful. If the connection closure causes small/big problems (e.g. =
messages discarded) to the server, the client needs to be informed =
accordingly.
=20
> This is not a protocol error at all. This is a valid use case. Upon=20
> receipt of the close frame, the server must discard all the partial=20
> frames received, of course. But that is not an error.

The server cannot discard something easily, if processing of the message =
has already started, that's the difference between streamed and buffered =
processing.

> From: Peter Thorson [mailto:webmaster@zaphoyd.com] Regarding sending=20
> 1006. The spec specifically says that codes 1005 and 1006 are NOT to=20
> be used on the wire in any case. A 1006 is intended to be delivered to =

> the end application in the case where the connection was terminated=20
> with no closing handshake at all. If there were language in the spec=20
> preventing closes in the middle of fragmented messages I would return=20
> a 1002/protocol error.

You are correct, that's my mistake. I could change this to 1002 but this =
doesn't describe this error condition either, 1002 means that the server =
drops connection due to client protocol violation, but this is not the =
actual case during this test since the server closes the connection =
because the client requested it to do so, but at the same time it should =
inform the client that the closure was not graceful.

1000 -  states

      1000 indicates a normal closure, meaning whatever purpose the
      connection was established for has been fulfilled.

So in the case described above the connection was established in order =
to commit the 800MB dataset into the database. But due to some =
circumstances the connection is being closed down before the transfer is =
complete. I do believe that we do need to inform the client about what =
happened -- if the server had no problem then that's ok, but if the =
server does not consider the closure as being graceful then the client =
does need to be informed of this.

I don't have any technical problem changing my implementation to send =
code 1000 in this case or to send no error code at all. But it is my =
strong opinion that this would be wrong.

With best regards,
Arman


From ibc@aliax.net  Wed Nov  2 07:07:00 2011
Return-Path: <ibc@aliax.net>
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 96B7011E80AF for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 07:07:00 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.643
X-Spam-Level: 
X-Spam-Status: No, score=-2.643 tagged_above=-999 required=5 tests=[AWL=0.034,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 wYrpX9ElEbnE for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 07:07:00 -0700 (PDT)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id DFC2911E80A4 for <hybi@ietf.org>; Wed,  2 Nov 2011 07:06:59 -0700 (PDT)
Received: by vcbfl11 with SMTP id fl11so198869vcb.31 for <hybi@ietf.org>; Wed, 02 Nov 2011 07:06:59 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.70.98 with SMTP id l2mr4575866vdu.101.1320242819324; Wed, 02 Nov 2011 07:06:59 -0700 (PDT)
Received: by 10.220.184.6 with HTTP; Wed, 2 Nov 2011 07:06:59 -0700 (PDT)
In-Reply-To: <002701cc9962$eb8776b0$c2966410$@noemax.com>
References: <002201cc9945$98696960$c93c3c20$@noemax.com> <4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com> <CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com> <002701cc9962$eb8776b0$c2966410$@noemax.com>
Date: Wed, 2 Nov 2011 15:06:59 +0100
Message-ID: <CALiegfnpX230pAJgZXS4=T2pCX9pwhurSw1L4uaUNrggezn+Gg@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Arman Djusupov <arman@noemax.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org, Peter Thorson <webmaster@zaphoyd.com>
Subject: Re: [hybi] Testsuite update case 7.1.5
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, 02 Nov 2011 14:07:00 -0000

2011/11/2 Arman Djusupov <arman@noemax.com>:
>> 2011/11/2 Peter Thorson <webmaster@zaphoyd.com>:
>> > There is nothing in the websocket spec that indicates that closing
>> > the
>> connection while a message has been partially sent should be
>> considered a protocol violation. Question for the list: Should there be?
>>
>> IMHO not. I see a use case:
>>
>> - I'm sending to the server a ISO image (800MB) by splitting the file
>> into multiple WS frames. It would take 120 minutes to upload the
>> entire WS message.
>
> Understood. However we are discussing a fragmented message, where the mes=
sage might have already started being processed and the server might have a=
llocated resources and threads for processing the message. This is the proc=
ess that is getting interrupted by a close frame.
>
> Imagine the content being sent to be an 800MB XML dataset which is gettin=
g committed to the database. If such a message gets interrupt then the serv=
er will have an error condition that requires it to roll back the entire tr=
ansaction. The server should reply with a status code that clearly indicate=
s that this connection closure was not graceful so that the client realizes=
 that the connection closure caused problems to the server side. In my view=
 you cannot refer to this as being a "graceful" closure when the server has=
 to recover from the error state.
>
> A graceful closure should be mutually graceful, otherwise it isn't gracef=
ul. If the connection closure causes small/big problems (e.g. messages disc=
arded) to the server, the client needs to be informed accordingly.

The example you are describing it just up to the application on top of
WebSocket. WS frames are not (MUST not be) aware of the semantic of
the carried data. So from the point of view of WS there is no
difference when carrying a big ISO file or a big XML file.

In the case of the big XML which is getting committed to the database
by the server: if the client interrupts it the server must, indeed,
free allocated resources and so, but that is up to the server
application. This is not "anormal" so there should be no error
indication at transport level (and the transport level are the WS
frames).

This is the same as if you open a TCP connection with a server, send a
HTTP GET to download a very big file and interrupt it from client side
by sending a TCP disconnection. The TCP response of the server must be
the correct one, it does not matter whether the server was doing
something (or not) with the carried data.



>> This is not a protocol error at all. This is a valid use case. Upon
>> receipt of the close frame, the server must discard all the partial
>> frames received, of course. But that is not an error.
>
> The server cannot discard something easily, if processing of the message =
has already started, that's the difference between streamed and buffered pr=
ocessing.

But that's a problem at application level, not a transport level, and
WebSocket close frames are part of the transport layer.



> 1000 -  states
>
>      1000 indicates a normal closure, meaning whatever purpose the
>      connection was established for has been fulfilled.
>
> So in the case described above the connection was established in order to=
 commit the 800MB dataset into the database. But due to some circumstances =
the connection is being closed down before the transfer is complete. I do b=
elieve that we do need to inform the client about what happened -- if the s=
erver had no problem then that's ok, but if the server does not consider th=
e closure as being graceful then the client does need to be informed of thi=
s.

The closure is graceful at WS level since the client sent a valid and
correct close frame.


> I don't have any technical problem changing my implementation to send cod=
e 1000 in this case or to send no error code at all. But it is my strong op=
inion that this would be wrong.

IMHO it's 100% correct as justified in this mail :)

From webmaster@zaphoyd.com  Wed Nov  2 07:34:51 2011
Return-Path: <webmaster@zaphoyd.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 D560621F8D42 for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 07:34:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.282
X-Spam-Level: 
X-Spam-Status: No, score=-1.282 tagged_above=-999 required=5 tests=[AWL=-0.079, BAYES_00=-2.599, MIME_QP_LONG_LINE=1.396]
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 EZlp8rwbzw5S for <hybi@ietfa.amsl.com>; Wed,  2 Nov 2011 07:34:51 -0700 (PDT)
Received: from sh78.surpasshosting.com (sh78.surpasshosting.com [72.29.64.142]) by ietfa.amsl.com (Postfix) with ESMTP id 2FC2B21F8D17 for <hybi@ietf.org>; Wed,  2 Nov 2011 07:34:51 -0700 (PDT)
Received: from c-68-51-77-246.hsd1.il.comcast.net ([68.51.77.246]:35002 helo=[10.0.1.3]) by sh78.surpasshosting.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.69) (envelope-from <webmaster@zaphoyd.com>) id 1RLbtw-00009a-Gr for hybi@ietf.org; Wed, 02 Nov 2011 10:34:50 -0400
References: <002201cc9945$98696960$c93c3c20$@noemax.com> <4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com> <CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com> <002701cc9962$eb8776b0$c2966410$@noemax.com>
From: Peter Thorson <webmaster@zaphoyd.com>
Content-Type: text/plain; charset=us-ascii
X-Mailer: iPad Mail (9A334)
In-Reply-To: <002701cc9962$eb8776b0$c2966410$@noemax.com>
Message-Id: <B678823E-A076-4552-A2F2-C009C0C8B616@zaphoyd.com>
Date: Wed, 2 Nov 2011 09:34:48 -0500
To: hybi@ietf.org
Content-Transfer-Encoding: quoted-printable
Mime-Version: 1.0 (1.0)
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - sh78.surpasshosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - zaphoyd.com
X-Source: 
X-Source-Args: 
X-Source-Dir: 
Subject: Re: [hybi] Testsuite update case 7.1.5
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, 02 Nov 2011 14:34:51 -0000

On Nov 2, 2011, at 8:25, "Arman Djusupov" <arman@noemax.com> wrote:

>> 2011/11/2 Peter Thorson <webmaster@zaphoyd.com>:
>>> There is nothing in the websocket spec that indicates that closing=20
>>> the
>> connection while a message has been partially sent should be=20
>> considered a protocol violation. Question for the list: Should there be?
>>=20
>> IMHO not. I see a use case:
>>=20
>> - I'm sending to the server a ISO image (800MB) by splitting the file=20
>> into multiple WS frames. It would take 120 minutes to upload the=20
>> entire WS message.
>=20
> Understood. However we are discussing a fragmented message, where the mess=
age might have already started being processed and the server might have all=
ocated resources and threads for processing the message. This is the process=
 that is getting interrupted by a close frame.
>=20
> Imagine the content being sent to be an 800MB XML dataset which is getting=
 committed to the database. If such a message gets interrupt then the server=
 will have an error condition that requires it to roll back the entire trans=
action. The server should reply with a status code that clearly indicates th=
at this connection closure was not graceful so that the client realizes that=
 the connection closure caused problems to the server side. In my view you c=
annot refer to this as being a "graceful" closure when the server has to rec=
over from the error state.
>=20
> A graceful closure should be mutually graceful, otherwise it isn't gracefu=
l. If the connection closure causes small/big problems (e.g. messages discar=
ded) to the server, the client needs to be informed accordingly.
>=20
>> This is not a protocol error at all. This is a valid use case. Upon=20
>> receipt of the close frame, the server must discard all the partial=20
>> frames received, of course. But that is not an error.
>=20
> The server cannot discard something easily, if processing of the message h=
as already started, that's the difference between streamed and buffered proc=
essing.
>=20
>> From: Peter Thorson [mailto:webmaster@zaphoyd.com] Regarding sending=20
>> 1006. The spec specifically says that codes 1005 and 1006 are NOT to=20
>> be used on the wire in any case. A 1006 is intended to be delivered to=20=

>> the end application in the case where the connection was terminated=20
>> with no closing handshake at all. If there were language in the spec=20
>> preventing closes in the middle of fragmented messages I would return=20
>> a 1002/protocol error.
>=20
> You are correct, that's my mistake. I could change this to 1002 but this d=
oesn't describe this error condition either, 1002 means that the server drop=
s connection due to client protocol violation, but this is not the actual ca=
se during this test since the server closes the connection because the clien=
t requested it to do so, but at the same time it should inform the client th=
at the closure was not graceful.
>=20
> 1000 -  states
>=20
>      1000 indicates a normal closure, meaning whatever purpose the
>      connection was established for has been fulfilled.
>=20
> So in the case described above the connection was established in order to c=
ommit the 800MB dataset into the database. But due to some circumstances the=
 connection is being closed down before the transfer is complete. I do belie=
ve that we do need to inform the client about what happened -- if the server=
 had no problem then that's ok, but if the server does not consider the clos=
ure as being graceful then the client does need to be informed of this.
>=20
> I don't have any technical problem changing my implementation to send code=
 1000 in this case or to send no error code at all. But it is my strong opin=
ion that this would be wrong.
>=20
> With best regards,
> Arman

The way the websocket spec is written today, from the point of view of the w=
ebsocket layer the close is clean. The uncleanness that you are describing i=
s from the application's point of view. If the client and server want more d=
etailed application level closing they should negotiate (either implicitly o=
r via a sub protocol) some 3xxx or 4xxx close codes for their needs.=20

Ex:=20
4000: please cancel the transaction and rollback the db
4001: I am leaving please save my partial transfer so we can resume later

In is case the server echoing back that code will confirm to the client that=
 they agree on the reason and state of the connection close.=

From arman@noemax.com  Thu Nov  3 00:54:01 2011
Return-Path: <arman@noemax.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 CCDD51F0C49 for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 00:54:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.909
X-Spam-Level: 
X-Spam-Status: No, score=-1.909 tagged_above=-999 required=5 tests=[AWL=0.390,  BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
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 YJh6smUaY7yc for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 00:54:01 -0700 (PDT)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by ietfa.amsl.com (Postfix) with ESMTP id 3D0301F0C42 for <hybi@ietf.org>; Thu,  3 Nov 2011 00:54:01 -0700 (PDT)
Received: from ArmanLaptop by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id MSE96155; Thu, 03 Nov 2011 09:53:55 +0200
From: "Arman Djusupov" <arman@noemax.com>
To: =?utf-8?Q?'I=C3=B1aki_Baz_Castillo'?= <ibc@aliax.net>
References: <002201cc9945$98696960$c93c3c20$@noemax.com>	<4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com>	<CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com>	<002701cc9962$eb8776b0$c2966410$@noemax.com> <CALiegfnpX230pAJgZXS4=T2pCX9pwhurSw1L4uaUNrggezn+Gg@mail.gmail.com>
In-Reply-To: <CALiegfnpX230pAJgZXS4=T2pCX9pwhurSw1L4uaUNrggezn+Gg@mail.gmail.com>
Date: Thu, 3 Nov 2011 09:53:50 +0200
Message-ID: <000801cc99fd$bdcd5d70$39681850$@noemax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
thread-index: AQH2ByfKsUFABchpiUfiw5MkelvqlgHOUuMiArZLHcUBy2YrdQHuryVWlQX2v/A=
Content-Language: en-us
Cc: hybi@ietf.org, 'Peter Thorson' <webmaster@zaphoyd.com>
Subject: Re: [hybi] Testsuite update case 7.1.5
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: Thu, 03 Nov 2011 07:54:01 -0000

> From: I=C3=B1aki Baz Castillo [mailto:ibc@aliax.net] This is the same =
as if=20
> you open a TCP connection with a server, send a HTTP GET to download a =

> very big file and interrupt it from client side by sending a TCP=20
> disconnection. The TCP response of the server must be the correct one, =

> it does not matter whether the server was doing something (or not)=20
> with the carried data.

In the case above the TCP disconnection will not be graceful and a =
socket error will be reported (either on both or on one of the sides) =
and the connection will be closed -- but it won't be closed gracefully.

A better example would be when the client sends an HTTP POST request =
with chunked transfer encoding and drops the connection without sending =
a final chunk, that would definitely be an error and the HTTP server =
would log it. Similarly, having no final frame is an error with a =
WebSocket fragmented message. This is similar to a network error, it is =
an "unclean" situation which is abnormal and not covered by the spec.

The original idea behind the close frame was to ensure that the remote =
side has received the complete data before the closure of the TCP =
connection. But what is the point of sending the close frame when the =
client deliberately sends an incomplete message and what the point of =
replying with a close frame when the server knows that the data received =
is incomplete - may be terminating the connection would be more proper?

With best regards,
Arman


From ibc@aliax.net  Thu Nov  3 02:19:13 2011
Return-Path: <ibc@aliax.net>
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 CDACC11E808B for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 02:19:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.643
X-Spam-Level: 
X-Spam-Status: No, score=-2.643 tagged_above=-999 required=5 tests=[AWL=0.034,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 ILaGEKda2DMX for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 02:19:13 -0700 (PDT)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by ietfa.amsl.com (Postfix) with ESMTP id D958711E8088 for <hybi@ietf.org>; Thu,  3 Nov 2011 02:19:12 -0700 (PDT)
Received: by vws5 with SMTP id 5so1069934vws.31 for <hybi@ietf.org>; Thu, 03 Nov 2011 02:19:11 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.33.84 with SMTP id p20mr8715546vdi.32.1320311951059; Thu, 03 Nov 2011 02:19:11 -0700 (PDT)
Received: by 10.220.107.206 with HTTP; Thu, 3 Nov 2011 02:19:11 -0700 (PDT)
In-Reply-To: <000801cc99fd$bdcd5d70$39681850$@noemax.com>
References: <002201cc9945$98696960$c93c3c20$@noemax.com> <4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com> <CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com> <002701cc9962$eb8776b0$c2966410$@noemax.com> <CALiegfnpX230pAJgZXS4=T2pCX9pwhurSw1L4uaUNrggezn+Gg@mail.gmail.com> <000801cc99fd$bdcd5d70$39681850$@noemax.com>
Date: Thu, 3 Nov 2011 10:19:11 +0100
Message-ID: <CALiegfkKhEPReZTOxm6wchW3mvnfovcCoSumvWxgBsGLZqiQ6Q@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Arman Djusupov <arman@noemax.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org, Peter Thorson <webmaster@zaphoyd.com>
Subject: Re: [hybi] Testsuite update case 7.1.5
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: Thu, 03 Nov 2011 09:19:13 -0000

2011/11/3 Arman Djusupov <arman@noemax.com>:
>> From: I=C3=B1aki Baz Castillo [mailto:ibc@aliax.net] This is the same as=
 if
>> you open a TCP connection with a server, send a HTTP GET to download a
>> very big file and interrupt it from client side by sending a TCP
>> disconnection. The TCP response of the server must be the correct one,
>> it does not matter whether the server was doing something (or not)
>> with the carried data.
>
> In the case above the TCP disconnection will not be graceful and a socket=
 error will be reported (either on both or on one of the sides) and the con=
nection will be closed -- but it won't be closed gracefully.

Why is it not graceful? Tthe TCP layer is not aware of how much data
the HTTP application layer wants to send.


> A better example would be when the client sends an HTTP POST request with=
 chunked transfer encoding and drops the connection without sending a final=
 chunk, that would definitely be an error and the HTTP server would log it.=
 Similarly, having no final frame is an error with a WebSocket fragmented m=
essage. This is similar to a network error, it is an "unclean" situation wh=
ich is abnormal and not covered by the spec.
>
> The original idea behind the close frame was to ensure that the remote si=
de has received the complete data before the closure of the TCP connection.=
 But what is the point of sending the close frame when the client deliberat=
ely sends an incomplete message and what the point of replying with a close=
 frame when the server knows that the data received is incomplete - may be =
terminating the connection would be more proper?

I understand your point, and given your rationale I could agree.



--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From arman@noemax.com  Thu Nov  3 06:21:21 2011
Return-Path: <arman@noemax.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 3A98B11E8110 for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 06:21:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.039
X-Spam-Level: 
X-Spam-Status: No, score=-2.039 tagged_above=-999 required=5 tests=[AWL=0.260,  BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
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 QD2lyhw9owCV for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 06:21:20 -0700 (PDT)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by ietfa.amsl.com (Postfix) with ESMTP id 9F50D11E810F for <hybi@ietf.org>; Thu,  3 Nov 2011 06:21:20 -0700 (PDT)
Received: from ArmanLaptop by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id MYY14815; Thu, 03 Nov 2011 15:21:15 +0200
From: "Arman Djusupov" <arman@noemax.com>
To: =?utf-8?Q?'I=C3=B1aki_Baz_Castillo'?= <ibc@aliax.net>
References: <002201cc9945$98696960$c93c3c20$@noemax.com>	<4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com>	<CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com>	<002701cc9962$eb8776b0$c2966410$@noemax.com>	<CALiegfnpX230pAJgZXS4=T2pCX9pwhurSw1L4uaUNrggezn+Gg@mail.gmail.com>	<000801cc99fd$bdcd5d70$39681850$@noemax.com> <CALiegfkKhEPReZTOxm6wchW3mvnfovcCoSumvWxgBsGLZqiQ6Q@mail.gmail.com>
In-Reply-To: <CALiegfkKhEPReZTOxm6wchW3mvnfovcCoSumvWxgBsGLZqiQ6Q@mail.gmail.com>
Date: Thu, 3 Nov 2011 15:21:09 +0200
Message-ID: <001201cc9a2b$780115b0$68034110$@noemax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
thread-index: AQH2ByfKsUFABchpiUfiw5MkelvqlgHOUuMiArZLHcUBy2YrdQHuryVWAgPL4MQAwc11EJTwJbVA
Content-Language: en-us
Cc: hybi@ietf.org, 'Peter Thorson' <webmaster@zaphoyd.com>
Subject: Re: [hybi] Testsuite update case 7.1.5
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: Thu, 03 Nov 2011 13:21:21 -0000

> From: I=C3=B1aki Baz Castillo [mailto:ibc@aliax.net] Why is it not=20
> graceful? Tthe TCP layer is not aware of how much data the HTTP=20
> application layer wants to send.

Yes, TCP is not aware about how much data an application plans to =
exchange. But an application is required to follow specific steps in =
order to ensure that a TCP connection is closed gracefully, without data =
loss or errors from the socket API. From the perspective of the socket =
API the closure is graceful when both sides stop writing, call =
shutdown(), then recv() returns 0 and finally the socket handles are =
closed. If there were no errors while performing those steps, then this =
is a reasonable indication that no data was discarded and both sides are =
closing the connection on mutual agreement.=20

However, exactly because the TCP layer is not entirely reliable on that =
matter, and may fail to detect problems when closing a connection, there =
is the additional WebSocket closing handshake that we put into the =
protocol in order to provide an additional assurance that the connection =
is being closed with no data being discarded.

That's why I believe that exchanging code 1000-OK, when data is being =
deliberately left incomplete and knowingly discarded, is wrong.

> I understand your point, and given your rationale I could agree.

Thanks!

With best regards,
Arman


From stpeter@stpeter.im  Thu Nov  3 07:34:37 2011
Return-Path: <stpeter@stpeter.im>
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 7D5051F0C65 for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 07:34:37 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.599
X-Spam-Level: 
X-Spam-Status: No, score=-102.599 tagged_above=-999 required=5 tests=[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 4tkzji9RSuhz for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 07:34:37 -0700 (PDT)
Received: from stpeter.im (mailhost.stpeter.im [207.210.219.225]) by ietfa.amsl.com (Postfix) with ESMTP id F2CD61F0C5A for <hybi@ietf.org>; Thu,  3 Nov 2011 07:34:36 -0700 (PDT)
Received: from squire.local (unknown [128.107.239.233]) (Authenticated sender: stpeter) by stpeter.im (Postfix) with ESMTPSA id 41E9641FE4 for <hybi@ietf.org>; Thu,  3 Nov 2011 08:40:15 -0600 (MDT)
Message-ID: <4EB2A67C.4070209@stpeter.im>
Date: Thu, 03 Nov 2011 07:34:36 -0700
From: Peter Saint-Andre <stpeter@stpeter.im>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <4EB21716.2040204@nokia.com>
In-Reply-To: <4EB21716.2040204@nokia.com>
X-Enigmail-Version: 1.3.2
OpenPGP: url=https://stpeter.im/stpeter.asc
X-Forwarded-Message-Id: <4EB21716.2040204@nokia.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Subject: [hybi] Fwd: CfC: publish a Candidate Recommendation of WebSockets API; deadline  Nov 9
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: Thu, 03 Nov 2011 14:34:37 -0000

FYI.

-------- Original Message --------
Subject: CfC: publish a Candidate Recommendation of WebSockets API;
deadline  Nov 9
Resent-Date: Thu, 03 Nov 2011 04:23:37 +0000
Resent-From: public-webapps@w3.org
Date: Wed, 02 Nov 2011 21:22:46 -0700
From: Arthur Barstow <art.barstow@nokia.com>
To: public-webapps <public-webapps@w3.org>

During the October 31 meeting [1], there was agreement to publish a
Candidate Recommendation of the WebSockets API and this is a Call for
Consensus to do so:

  http://dev.w3.org/html5/websockets/

The remaining open editorial bug [13700] will be fixed before publication.

I propose the CR exit criteria is the same as our last CR (Progress Events):

[[
To exit the Candidate Recommendation (CR) stage the following criteria
must have been met:

1. There will be at least two interoperable implementations passing all
test cases in the test suite for this specification. An implementation
is to be available (i.e. for download), shipping (i.e. not private), and
not experimental (i.e. intended for a wide audience). The working group
will decide when the test suite is of sufficient quality to test
interoperability and will produce an implementation report (hosted
together with the test suite).

2. A minimum of three months of the CR stage will have elapsed (i.e. not
until after DD MMM 2012). This is to ensure that enough time is given
for any remaining major errors to be caught. The CR period will be
extended if implementations are slow to appear.
]]

This CfC satisfies: a) the group's requirement to "record the group's
decision to request advancement" to CR; and b) "General Requirements for
Advancement on the Recommendation Track" as defined in the Process Document:

  http://www.w3.org/2005/10/Process-20051014/tr.html#transition-reqs

As with all of our CfCs, positive response is preferred and encouraged
and silence will be considered as agreeing with the proposal. The
deadline for comments is November 9 and all comments should be sent to
public-webapps at w3.org.

-AB

[1] http://www.w3.org/2011/10/31-webapps-minutes.html#item14
[13700] http://www.w3.org/Bugs/Public/show_bug.cgi?id=13700



From julian.reschke@gmx.de  Thu Nov  3 07:52:29 2011
Return-Path: <julian.reschke@gmx.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 49B6811E80D4 for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 07:52:29 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.26
X-Spam-Level: 
X-Spam-Status: No, score=-104.26 tagged_above=-999 required=5 tests=[AWL=-1.661, 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 CmsBI6FzYROu for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 07:52:28 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by ietfa.amsl.com (Postfix) with SMTP id 6D84811E808E for <hybi@ietf.org>; Thu,  3 Nov 2011 07:52:27 -0700 (PDT)
Received: (qmail invoked by alias); 03 Nov 2011 14:52:22 -0000
Received: from mail.greenbytes.de (EHLO [192.168.1.140]) [217.91.35.233] by mail.gmx.net (mp011) with SMTP; 03 Nov 2011 15:52:22 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1+2X1tHPbe20xOXgOUbdHQY9wZivQ5HBQgZFsWxqR BcOvS7u1+h4YLk
Message-ID: <4EB2AAA3.8080103@gmx.de>
Date: Thu, 03 Nov 2011 15:52:19 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: Peter Saint-Andre <stpeter@stpeter.im>
References: <4EB21716.2040204@nokia.com> <4EB2A67C.4070209@stpeter.im>
In-Reply-To: <4EB2A67C.4070209@stpeter.im>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Fwd: CfC: publish a Candidate Recommendation of WebSockets API; deadline  Nov 9
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: Thu, 03 Nov 2011 14:52:29 -0000

On 2011-11-03 15:34, Peter Saint-Andre wrote:
> FYI.
> ...

-> <http://lists.w3.org/Archives/Public/public-webapps/2011OctDec/0655.html>

Best regards, Julian

From julian.reschke@gmx.de  Thu Nov  3 08:13:04 2011
Return-Path: <julian.reschke@gmx.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 D36461F0C34 for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 08:13:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.217
X-Spam-Level: 
X-Spam-Status: No, score=-104.217 tagged_above=-999 required=5 tests=[AWL=-1.618, 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 F6p+R6Bwp+MF for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 08:13:03 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by ietfa.amsl.com (Postfix) with SMTP id 683511F0C96 for <hybi@ietf.org>; Thu,  3 Nov 2011 08:13:03 -0700 (PDT)
Received: (qmail invoked by alias); 03 Nov 2011 15:13:02 -0000
Received: from mail.greenbytes.de (EHLO [192.168.1.140]) [217.91.35.233] by mail.gmx.net (mp068) with SMTP; 03 Nov 2011 16:13:02 +0100
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1/AzBlQ9cPANEp+yImve9CTPlm2Oc52i5sMtuiPdl nqcuP46p3IJab7
Message-ID: <4EB2AF7D.800@gmx.de>
Date: Thu, 03 Nov 2011 16:13:01 +0100
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <4EB2AE28.1090602@gmx.de>
In-Reply-To: <4EB2AE28.1090602@gmx.de>
X-Forwarded-Message-Id: <4EB2AE28.1090602@gmx.de>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Subject: [hybi] Fwd: Re: Spec changes for LCs and later maturity levels
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: Thu, 03 Nov 2011 15:13:05 -0000

(FYI)

-------- Original Message --------
Subject: Re: Spec changes for LCs and later maturity levels
Date: Thu, 03 Nov 2011 16:07:20 +0100
From: Julian Reschke <julian.reschke@gmx.de>
To: Anne van Kesteren <annevk@opera.com>
CC: Ian Hickson <ian@hixie.ch>, Arthur Barstow <art.barstow@nokia.com>, 
  public-webapps <public-webapps@w3.org>

On 2011-11-02 20:02, Anne van Kesteren wrote:
> On Wed, 02 Nov 2011 11:59:14 -0700, Julian Reschke
> <julian.reschke@gmx.de> wrote:
>> On 2011-11-02 19:46, Anne van Kesteren wrote:
>>> If you are confused about the terms, they are defined in HTML.
>>
>> But they aren't linked, as far as I can tell. It would be good if they
>> were, and then we can review that text again.
>
> They are in
>
> http://www.whatwg.org/specs/web-apps/current-work/multipage/network.html#parsing-websocket-urls
>
>
> so you can use that for review.
> ...

OK, I have tried to understand what's going on here, but I largely failed.

0) The algorithm "Resolve the url string" doesn't exist in the spec, nor
does it reference anything. If nobody has complained about this yet then
my conclusion is that nobody has read that section. Not surprisingly, as
it was added past last-call.

1) Anne explains that it's supposed to reference
<http://www.whatwg.org/specs/web-apps/current-work/multipage/urls.html#resolve-a-url>, 

so that change should be made.

2) Assuming that change *will* be made...: the difference to what the
protocol spec says seems to be...

2a) it deals with IRIs (converting them to URIs),

2b) it specifies certain fixup operations for broken input, such as
converting \ to /, which, last time I checked, were controversial even
among browser implementers.

Reminder: this was a past-LC change. I think I'm not asking too much
when I'm asking for a precise explanation of what the rational for this
change was.

Best regards, Julian

From tobias.oberstein@tavendo.de  Thu Nov  3 13:44:49 2011
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 7FF8C11E811B for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 13:44:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.43
X-Spam-Level: 
X-Spam-Status: No, score=-2.43 tagged_above=-999 required=5 tests=[AWL=-0.131,  BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
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 IQicCANRFdAG for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 13:44:49 -0700 (PDT)
Received: from EXHUB020-4.exch020.serverdata.net (exhub020-4.exch020.serverdata.net [206.225.164.31]) by ietfa.amsl.com (Postfix) with ESMTP id E33CC11E80F8 for <hybi@ietf.org>; Thu,  3 Nov 2011 13:44:48 -0700 (PDT)
Received: from EXVMBX020-12.exch020.serverdata.net ([169.254.3.235]) by EXHUB020-4.exch020.serverdata.net ([206.225.164.31]) with mapi; Thu, 3 Nov 2011 13:44:47 -0700
From: Tobias Oberstein <tobias.oberstein@tavendo.de>
To: Arman Djusupov <arman@noemax.com>, =?utf-8?B?J0nDsWFraSBCYXogQ2FzdGlsbG8n?= <ibc@aliax.net>
Date: Thu, 3 Nov 2011 13:44:43 -0700
Thread-Topic: [hybi] Testsuite update case 7.1.5
Thread-Index: AQH2ByfKsUFABchpiUfiw5MkelvqlgHOUuMiArZLHcUBy2YrdQHuryVWAgPL4MQAwc11EJTwJbVAgABzV7A=
Message-ID: <634914A010D0B943A035D226786325D42D0C0CDF38@EXVMBX020-12.exch020.serverdata.net>
References: <002201cc9945$98696960$c93c3c20$@noemax.com> <4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com> <CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com> <002701cc9962$eb8776b0$c2966410$@noemax.com> <CALiegfnpX230pAJgZXS4=T2pCX9pwhurSw1L4uaUNrggezn+Gg@mail.gmail.com> <000801cc99fd$bdcd5d70$39681850$@noemax.com> <CALiegfkKhEPReZTOxm6wchW3mvnfovcCoSumvWxgBsGLZqiQ6Q@mail.gmail.com> <001201cc9a2b$780115b0$68034110$@noemax.com>
In-Reply-To: <001201cc9a2b$780115b0$68034110$@noemax.com>
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="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Cc: "hybi@ietf.org" <hybi@ietf.org>, 'Peter Thorson' <webmaster@zaphoyd.com>
Subject: Re: [hybi] Testsuite update case 7.1.5
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: Thu, 03 Nov 2011 20:44:49 -0000

PiBIb3dldmVyLCBleGFjdGx5IGJlY2F1c2UgdGhlIFRDUCBsYXllciBpcyBub3QgZW50aXJlbHkg
cmVsaWFibGUgb24gdGhhdA0KPiBtYXR0ZXIsIGFuZCBtYXkgZmFpbCB0byBkZXRlY3QgcHJvYmxl
bXMgd2hlbiBjbG9zaW5nIGEgY29ubmVjdGlvbiwgdGhlcmUgaXMNCj4gdGhlIGFkZGl0aW9uYWwg
V2ViU29ja2V0IGNsb3NpbmcgaGFuZHNoYWtlIHRoYXQgd2UgcHV0IGludG8gdGhlIHByb3RvY29s
IGluDQo+IG9yZGVyIHRvIHByb3ZpZGUgYW4gYWRkaXRpb25hbCBhc3N1cmFuY2UgdGhhdCB0aGUg
Y29ubmVjdGlvbiBpcyBiZWluZyBjbG9zZWQNCj4gd2l0aCBubyBkYXRhIGJlaW5nIGRpc2NhcmRl
ZC4NCj4gDQo+IFRoYXQncyB3aHkgSSBiZWxpZXZlIHRoYXQgZXhjaGFuZ2luZyBjb2RlIDEwMDAt
T0ssIHdoZW4gZGF0YSBpcyBiZWluZw0KPiBkZWxpYmVyYXRlbHkgbGVmdCBpbmNvbXBsZXRlIGFu
ZCBrbm93aW5nbHkgZGlzY2FyZGVkLCBpcyB3cm9uZy4NCg0KSSB3b3VsZCBhcmd1ZTogYWxsIGZy
YW1lcyBoYXZlIGJlZW4gZnVsbHkgcmVjZWl2ZWQvcHJvY2Vzc2VkLCBzbyBubyBkYXRhDQpvbiB0
aGUgdHJhbnNwb3J0IGxheWVyIHdhcyBsb3N0IG9yIHN0dWNrIGluIHRoZSBUQ1Agc3RhY2suIFRo
ZSBjbG9zaW5nIEhTDQp3YXMgY2xlYW4uDQoNClRodXMsIDEwMDAgb3Igbm8gY2xvc2UgY29kZSBp
cyBhcHByb3ByaWF0ZSBmcm9tIGEgV1MgdHJhbnNwb3J0IHBvaW50IG9mIHZpZXcuDQoNCkFueSBv
dGhlciAxeHh4IG9yIGEgYnJ1dGFsIGRyb3AgVENQIGlzIG5vdCBhcHByb3ByaWF0ZS4NCg0KPT09
DQoNCk5vdywgaW50ZXJlc3RpbmdseSwgdGhlIHNwZWMgc2F5czoNCg0KMTAwMCBpbmRpY2F0ZXMg
YSBub3JtYWwgY2xvc3VyZSwgPj4gbWVhbmluZyB3aGF0ZXZlciBwdXJwb3NlIHRoZQ0KICAgICAg
Y29ubmVjdGlvbiB3YXMgZXN0YWJsaXNoZWQgZm9yIGhhcyBiZWVuIGZ1bGZpbGxlZC4gPDwNCg0K
V2FzIHRoZSAicHVycG9zZSBmdWxmaWxsZWQiIHdoZW4gdGhlIGNvbm5lY3Rpb24gd2FzIGNsb3Nl
ZCBjbGVhbmx5DQppbiB0aGUgbWlkZGxlIG9mIGEgZnJhZ21lbnRlZCBtZXNzYWdlPw0KDQpIbW07
KQ0KDQpCdXQgaW4gYW55IGNhc2UgSSBjYW4ndCBzZWUgYSBtb3JlIGFwcHJvcHJpYXRlIG9uZSBm
cm9tIHRoZSAxeHh4Lg0KDQo9PT0NCg0KSSBjYW4gc2VlIHRoYXQgZGF0YSBtaWdodCBiZSAiaW5j
b21wbGV0ZSIgZnJvbSBhbiBhcHBsaWNhdGlvbiBwb2ludCBvZiB2aWV3Lg0KDQpUaGUgcXVlc3Rp
b24gdGhlbiBpczogaWYgM3h4eC80eHh4IHdvdWxkIGJlIG9rIGluIHRoaXMgY2FzZSBhbHNvLCBh
bmQgaWYgc28sDQp1bmRlciB3aGF0IGNpcmN1bXN0YW5jZXM/DQoNClRoZSBzcGVjIHNheXMgYWJv
dXQgM3h4eC80eHh4OiAiVGhlIGludGVycHJldGF0aW9uIG9mIHRoZXNlIGNvZGVzIGlzIHVuZGVm
aW5lZA0KYnkgdGhpcyBwcm90b2NvbC4iDQoNCkl0IGRvZXMgbm90IG1ha2UgZWZmb3J0cyB0byBi
ZSBtb3JlIGV4cGxpY2l0LCBsaWtlIGkuZS4NCg0KQSBjbG9zZSBpbml0YXRvciBtYXkgdXNlIGEg
M3h4eCBpbnN0ZWFkIG9mIDEwMDAgYW55d2hlcmUgd2hlcmUgMTAwMCB3YXMgYWxsb3dlZA0KaWYg
YW5kIG9ubHkgaWYgYSBzdWJwcm90b2NvbCB3YXMgbmVnb3RpYXRlZCB0aGF0IGRlZmluZXMgdGhl
IG1lYW5pbmcgb2YgM3h4eC4NCg0KT3I6IDEwMDcgPSBpbnZhbGlkIHV0ZjgvcGF5bG9hZA0KDQpO
b3csIGxldHMgc2F5IGEgc3VicHJvdG9jb2wgQSBkZWZpbmVzIDMwMDMgPSAiaW52YWxpZCB1dGY4
OiBzdXJyb2dhdGUgcGFpciINCg0KT24gYSBjb25uZWN0aW9uIHdpdGggbm8gc3VicHJvdG9jb2wg
bmVnb3RpYXRlZCwgaXMgdXNpbmcgMzAwMyBpbGxlZ2FsPw0KDQpPciBpcyAzMDAzIGVxdWl2YWxl
bnQgdG8gMTAwMCwgc2luY2UgaXQncyAidW5kZWZpbmVkIGJ5IHRoaXMgcHJvdG9jb2wiPw0KDQpB
bmQgaWYgQSBoYXMgYmVlbiBuZWdvdGlhdGVkLCBpcyB1c2luZyAzMDAzIHRoZW4gYWxsb3dlZCwg
d2hlcmUgbm9ybWFsbHkgMTAwNw0Kd291bGQgaGF2ZSBiZWVuIHVzZWQ/DQoNCk9yIGlzIGl0IG5v
dCBhbGxvd2VkIHRvIG92ZXJyaWRlIGJhc2UgZGVmaW5lZCBjb2Rlcz8NCg0K

From gregw@intalio.com  Thu Nov  3 16:27:02 2011
Return-Path: <gregw@intalio.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 B2A2721F9157 for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 16:27:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.752
X-Spam-Level: 
X-Spam-Status: No, score=-2.752 tagged_above=-999 required=5 tests=[AWL=-0.075, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 6pzEcsBtXkEx for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 16:27:02 -0700 (PDT)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id E3BF621F913C for <hybi@ietf.org>; Thu,  3 Nov 2011 16:27:01 -0700 (PDT)
Received: by vcbfl11 with SMTP id fl11so1893937vcb.31 for <hybi@ietf.org>; Thu, 03 Nov 2011 16:27:01 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.116.237 with SMTP id jz13mr6916624vdb.90.1320362820220; Thu, 03 Nov 2011 16:27:00 -0700 (PDT)
Received: by 10.52.180.161 with HTTP; Thu, 3 Nov 2011 16:27:00 -0700 (PDT)
In-Reply-To: <CALiegfnWD4-NNCFO898Xne4j+X1cnZXJ85hJMZT3J8+UDt94Tg@mail.gmail.com>
References: <CALiegfmgYSFvz0XRNR+YWQkb7CVg0WOK4bb=Od54t-Y9vQQbMA@mail.gmail.com> <20111101072919.GB12765@1wt.eu> <CALiegfnWD4-NNCFO898Xne4j+X1cnZXJ85hJMZT3J8+UDt94Tg@mail.gmail.com>
Date: Fri, 4 Nov 2011 10:27:00 +1100
Message-ID: <CAH_y2NHH_zmAQa4BgGpjt5PWttmO44yxN_e3-2qE74sLEOpKmA@mail.gmail.com>
From: Greg Wilkins <gregw@intalio.com>
To: =?ISO-8859-1?Q?I=F1aki_Baz_Castillo?= <ibc@aliax.net>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] How are Cookies added?
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: Thu, 03 Nov 2011 23:27:02 -0000

Inaki,

If you want to do cross site authentication and authorisation, then
cookies are not the mechanism you should use - at least not on their
own.

You will need to look to something like OAUTH to create token that can
be passed either in URL, or in a prior HTTP request that will set a
cookie that can then be used by WS.

This is no different than for normal Ajax websites/mashups.

cheers



On 1 November 2011 23:19, I=F1aki Baz Castillo <ibc@aliax.net> wrote:
> 2011/11/1 Willy Tarreau <w@1wt.eu>:
>> On Mon, Oct 31, 2011 at 08:20:02PM +0100, I=F1aki Baz Castillo wrote:
>>> Must I assume that Cookies will just be added (and automatically
>>> added) to the HTTP GET in case the URL of the WebSocket URI matches
>>> the domain of a previously visited web page?
>>>
>>> I hope the answer is "not", but given the nature of WebSocket I expect
>>> this is the only way, so this stuf will force me to use the same
>>> domain for the Web server and the WebSocket server (and then use all
>>> that funny HTTP stuf like undefined proxies, load-balancers and so).
>>> Please tell me that I'm wrong.
>>
>> What's wrong with having a websocket server under the same domain as
>> the web server ? At some point you want the code running in browsers
>> to be able to tell whether to send or not sensitive data to some site,
>> and domains are what's used to determine if cookies must be sent.
>>
>> You could for instance have www.yourdomain.com and ws.yourdomain.com
>> and use a cookie valid on ".yourdomain.com". I don't see why that would
>> make you use proxies or load balancers.
>
> Hi Willy, thanks a lot for your response. What worries me is the fact
> that WebSocket just define a built-in authentication mechanism (the
> "Cookie") and this is just valid when the web server and the websocket
> server belong to the same "website" or provider, so I cannot build me
> own page and include a JS from an external provider in which a
> WebSocket connection takes place with such external provider. Well, I
> can do it but I cannot pass a Cookie so the authentication must be
> done within the WebSocket Subprotocol.
>
> --
> I=F1aki Baz Castillo
> <ibc@aliax.net>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

From gregw@intalio.com  Thu Nov  3 16:43:26 2011
Return-Path: <gregw@intalio.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 E94CF11E80C2 for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 16:43:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.887
X-Spam-Level: 
X-Spam-Status: No, score=-2.887 tagged_above=-999 required=5 tests=[AWL=0.090,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 J34Z8MVoRxP1 for <hybi@ietfa.amsl.com>; Thu,  3 Nov 2011 16:43:26 -0700 (PDT)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by ietfa.amsl.com (Postfix) with ESMTP id 3BF5B11E8089 for <hybi@ietf.org>; Thu,  3 Nov 2011 16:43:26 -0700 (PDT)
Received: by vws5 with SMTP id 5so1921517vws.31 for <hybi@ietf.org>; Thu, 03 Nov 2011 16:43:25 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.240.132 with SMTP id wa4mr12568943vdc.16.1320363805178; Thu, 03 Nov 2011 16:43:25 -0700 (PDT)
Received: by 10.52.180.161 with HTTP; Thu, 3 Nov 2011 16:43:25 -0700 (PDT)
In-Reply-To: <634914A010D0B943A035D226786325D42D0B0D8372@EXVMBX020-12.exch020.serverdata.net>
References: <AcyWNajsoM/4C50qRjabcC/IvLSoRg==> <634914A010D0B943A035D226786325D42D0B0D8372@EXVMBX020-12.exch020.serverdata.net>
Date: Fri, 4 Nov 2011 10:43:25 +1100
Message-ID: <CAH_y2NGaEUqMKD4+TmByjFATyByoz0=MnEAaWSrv+wrFdHaFnw@mail.gmail.com>
From: Greg Wilkins <gregw@intalio.com>
To: Tobias Oberstein <tobias.oberstein@tavendo.de>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] opening headers: multiplicity / port in host
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: Thu, 03 Nov 2011 23:43:27 -0000

On 29 October 2011 23:27, Tobias Oberstein <tobias.oberstein@tavendo.de> wr=
ote:
>
> 3) Host header port?
>
> Hybi-17:
> """
> =A0 4. =A0 The request MUST contain a "Host" header field whose value is
> =A0 =A0 =A0 =A0equal to /host/.
> """
>
> It does not say "equal to /host/[:/port/]".
>
> However, i.e. both Firefox and Chrome will send i.e.
>
> Host: 127.0.0.1:9001
>
> Are both forms allowed?
>
> Host: /host/
> Host: /host/:/port/
>
> And if the client uses the 2nd, validate that /port/ is the one the serve=
r is listening on?

Note that the host and port are the ones that the client sent the
request to and not necessarily the ones that the server is listening
on.

For example, a client  could locally redirect wibble:666 to
www.example.com:80 and the host header received by the example.com
server should be wibble:666.

cheers

From duerst@it.aoyama.ac.jp  Fri Nov  4 01:17:59 2011
Return-Path: <duerst@it.aoyama.ac.jp>
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 D9D5821F8B84 for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 01:17:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -99.425
X-Spam-Level: 
X-Spam-Status: No, score=-99.425 tagged_above=-999 required=5 tests=[AWL=0.213, BAYES_00=-2.599, HELO_EQ_JP=1.244, HOST_EQ_JP=1.265,  MIME_8BIT_HEADER=0.3, SARE_SUB_ENC_UTF8=0.152, 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 1vcO-jh-V9YI for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 01:17:59 -0700 (PDT)
Received: from scintmta01.scbb.aoyama.ac.jp (scintmta01.scbb.aoyama.ac.jp [133.2.253.33]) by ietfa.amsl.com (Postfix) with ESMTP id 1AD7721F8B80 for <hybi@ietf.org>; Fri,  4 Nov 2011 01:17:57 -0700 (PDT)
Received: from scmse02.scbb.aoyama.ac.jp ([133.2.253.231]) by scintmta01.scbb.aoyama.ac.jp (secret/secret) with SMTP id pA48HkoI019138 for <hybi@ietf.org>; Fri, 4 Nov 2011 17:17:47 +0900
Received: from (unknown [133.2.206.133]) by scmse02.scbb.aoyama.ac.jp with smtp id 43eb_2ef0_7a1d4356_06bd_11e1_b8eb_001d096c5782; Fri, 04 Nov 2011 17:17:46 +0900
Received: from [IPv6:::1] ([133.2.210.1]:57318) by itmail.it.aoyama.ac.jp with [XMail 1.22 ESMTP Server] id <S156868D> for <hybi@ietf.org> from <duerst@it.aoyama.ac.jp>; Fri, 4 Nov 2011 17:17:48 +0900
Message-ID: <4EB39F9F.7010301@it.aoyama.ac.jp>
Date: Fri, 04 Nov 2011 17:17:35 +0900
From: =?UTF-8?B?Ik1hcnRpbiBKLiBEw7xyc3Qi?= <duerst@it.aoyama.ac.jp>
Organization: Aoyama Gakuin University
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100722 Eudora/3.0.4
MIME-Version: 1.0
To: =?UTF-8?B?ScOxYWtpIEJheiBDYXN0aWxsbw==?= <ibc@aliax.net>
References: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com>	<CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com>	<CALiegf=L62kmBszt8pkGbeeB+PgzKkoT2JxLTxJAgmrLyqLR6A@mail.gmail.com>	<CABLsOLDnyESFBxE356yQEANS6dfGTL74pROmN1oeG9RdBi4P8Q@mail.gmail.com>	<CALiegfmhR=unUKqiu_KiYgvV_AaJEUSJ_4KxwKhNX1qv1NuU+Q@mail.gmail.com>	<CABLsOLDvJ8dFf-7-65YLKTeb4TMDuk+L7x7kwihKaNs_2T45dg@mail.gmail.com>	<CALiegf=-c795zSSJkZj+6gfFUqaTi=BC0VhBv8p-9fGBhKN4Dw@mail.gmail.com>	<4EB099B4.6030304@it.aoyama.ac.jp> <CALiegfnDZy51AqGrj5m+Ch9x5jSWx4veg3nAJtYh7ZPD7CMU9Q@mail.gmail.com>
In-Reply-To: <CALiegfnDZy51AqGrj5m+Ch9x5jSWx4veg3nAJtYh7ZPD7CMU9Q@mail.gmail.com>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Cc: hybi@ietf.org
Subject: Re: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
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: Fri, 04 Nov 2011 08:18:00 -0000

Hello IÃ±aki,

Sorry to be late with my reply.

On 2011/11/02 17:45, IÃ±aki Baz Castillo wrote:
> 2011/11/2 "Martin J. DÃ¼rst"<duerst@it.aoyama.ac.jp>:

>> Anyway, I don't think it's WebSockets' fault, and I don't think it's SIPs
>> fault
>
> I don't agree. There is nothing wrong in allowing a signaling protocol
> to carry both text and binary bodies.

Yes. That's why I'm saying I don't think it's SIPs problem (assuming 
that the textual data is adequately labeled, e.g. with a MIME Media type 
and a 'charset' parameter).


> This is not a problem for common
> SIP clients.

Of course not. SIP clients are written to work with SIP.


> IMHO the WS frame type is something a bit artificial which just fits
> well with JavaScrtip given JavaScript limitations (converting from
> ArrayBuffer to String is hard).

It looks artificial from a SIP viewpoint. But distinguishing between 
binary and textual data isn't something artificial; it's something very 
important to avoid major problems.

Although things have improved recently, there were lots and lots of 
problems based on the fact that textual data was sent essentially as 
binary data without knowing how it was encoded. Given you have an "Ã±" in 
your name, I'm sure you know enough cases where that got garbled.

WebSockets tries to solve this problem in a way that differs from the 
standard approach used in email, HTTP, and so on. That's why at first 
sight, it may look somewhat unusual. And that's why there may be a need 
for some additional effort when converting from another protocol in a 
gateway, because textual data and binary data have to be separated.

But that's not because of JavaScript. Most modern programming languages 
use a single encoding for all their text internally, and separate text 
and binary. The only exception I know about is Ruby, and even in Ruby 
it's much easier to write programs that use a single encoding (UTF-8) 
for all their text than to write programs where each chunk of text is in 
a different encoding.

Regards,   Martin.

From ibc@aliax.net  Fri Nov  4 02:28:45 2011
Return-Path: <ibc@aliax.net>
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 485CB21F8C04 for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 02:28:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.643
X-Spam-Level: 
X-Spam-Status: No, score=-2.643 tagged_above=-999 required=5 tests=[AWL=0.034,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 PIXETz7FiHLD for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 02:28:44 -0700 (PDT)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id C298621F8B68 for <hybi@ietf.org>; Fri,  4 Nov 2011 02:28:43 -0700 (PDT)
Received: by vcbfl11 with SMTP id fl11so2199996vcb.31 for <hybi@ietf.org>; Fri, 04 Nov 2011 02:28:42 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.33.84 with SMTP id p20mr13935707vdi.32.1320398922846; Fri, 04 Nov 2011 02:28:42 -0700 (PDT)
Received: by 10.220.107.206 with HTTP; Fri, 4 Nov 2011 02:28:42 -0700 (PDT)
In-Reply-To: <CAH_y2NHH_zmAQa4BgGpjt5PWttmO44yxN_e3-2qE74sLEOpKmA@mail.gmail.com>
References: <CALiegfmgYSFvz0XRNR+YWQkb7CVg0WOK4bb=Od54t-Y9vQQbMA@mail.gmail.com> <20111101072919.GB12765@1wt.eu> <CALiegfnWD4-NNCFO898Xne4j+X1cnZXJ85hJMZT3J8+UDt94Tg@mail.gmail.com> <CAH_y2NHH_zmAQa4BgGpjt5PWttmO44yxN_e3-2qE74sLEOpKmA@mail.gmail.com>
Date: Fri, 4 Nov 2011 10:28:42 +0100
Message-ID: <CALiegf=LFMJ5e6i7wG=seEi7XvqUGiRuPS-7tG+sZC3=Zf7UzA@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Greg Wilkins <gregw@intalio.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] How are Cookies added?
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: Fri, 04 Nov 2011 09:28:45 -0000

2011/11/4 Greg Wilkins <gregw@intalio.com>:
> Inaki,
>
> If you want to do cross site authentication and authorisation, then
> cookies are not the mechanism you should use - at least not on their
> own.
>
> You will need to look to something like OAUTH to create token that can
> be passed either in URL, or in a prior HTTP request that will set a
> cookie that can then be used by WS.

Thanks Greg.


> This is no different than for normal Ajax websites/mashups.

But AJAX does not allow to contact a HTTP server different than the
domain from which the JS is downloaded, am I wrong?

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From ibc@aliax.net  Fri Nov  4 02:38:01 2011
Return-Path: <ibc@aliax.net>
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 0EDBC21F8C3D for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 02:38:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.567
X-Spam-Level: 
X-Spam-Status: No, score=-2.567 tagged_above=-999 required=5 tests=[AWL=-0.042, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, SARE_SUB_ENC_UTF8=0.152]
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 pxuQV1upSRkG for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 02:37:50 -0700 (PDT)
Received: from mail-vw0-f44.google.com (mail-vw0-f44.google.com [209.85.212.44]) by ietfa.amsl.com (Postfix) with ESMTP id 6601121F8C1A for <hybi@ietf.org>; Fri,  4 Nov 2011 02:37:50 -0700 (PDT)
Received: by vws5 with SMTP id 5so163397vws.31 for <hybi@ietf.org>; Fri, 04 Nov 2011 02:37:49 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.33.84 with SMTP id p20mr13963810vdi.32.1320399469783; Fri, 04 Nov 2011 02:37:49 -0700 (PDT)
Received: by 10.220.107.206 with HTTP; Fri, 4 Nov 2011 02:37:49 -0700 (PDT)
In-Reply-To: <4EB39F9F.7010301@it.aoyama.ac.jp>
References: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com> <CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com> <CALiegf=L62kmBszt8pkGbeeB+PgzKkoT2JxLTxJAgmrLyqLR6A@mail.gmail.com> <CABLsOLDnyESFBxE356yQEANS6dfGTL74pROmN1oeG9RdBi4P8Q@mail.gmail.com> <CALiegfmhR=unUKqiu_KiYgvV_AaJEUSJ_4KxwKhNX1qv1NuU+Q@mail.gmail.com> <CABLsOLDvJ8dFf-7-65YLKTeb4TMDuk+L7x7kwihKaNs_2T45dg@mail.gmail.com> <CALiegf=-c795zSSJkZj+6gfFUqaTi=BC0VhBv8p-9fGBhKN4Dw@mail.gmail.com> <4EB099B4.6030304@it.aoyama.ac.jp> <CALiegfnDZy51AqGrj5m+Ch9x5jSWx4veg3nAJtYh7ZPD7CMU9Q@mail.gmail.com> <4EB39F9F.7010301@it.aoyama.ac.jp>
Date: Fri, 4 Nov 2011 10:37:49 +0100
Message-ID: <CALiegf=myTF1FkxL6A-zVE+9rV_jay-8hsVT41SLiFXRkgzB0g@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: =?UTF-8?Q?Martin_J=2E_D=C3=BCrst?= <duerst@it.aoyama.ac.jp>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
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: Fri, 04 Nov 2011 09:38:01 -0000

2011/11/4 "Martin J. D=C3=BCrst" <duerst@it.aoyama.ac.jp>:
>> 2011/11/2 "Martin J. D=C3=BCrst"<duerst@it.aoyama.ac.jp>:
>
>>> Anyway, I don't think it's WebSockets' fault, and I don't think it's SI=
Ps
>>> fault
>>
>> I don't agree. There is nothing wrong in allowing a signaling protocol
>> to carry both text and binary bodies.
>
> Yes. That's why I'm saying I don't think it's SIPs problem (assuming that
> the textual data is adequately labeled, e.g. with a MIME Media type and a
> 'charset' parameter).

Sorry, I understood "I do think it's SIPs fault" :)



>> IMHO the WS frame type is something a bit artificial which just fits
>> well with JavaScrtip given JavaScript limitations (converting from
>> ArrayBuffer to String is hard).
>
> It looks artificial from a SIP viewpoint. But distinguishing between bina=
ry
> and textual data isn't something artificial; it's something very importan=
t
> to avoid major problems.

> Although things have improved recently, there were lots and lots of probl=
ems
> based on the fact that textual data was sent essentially as binary data
> without knowing how it was encoded. Given you have an "=C3=B1" in your na=
me, I'm
> sure you know enough cases where that got garbled.

Too much... :(


> WebSockets tries to solve this problem in a way that differs from the
> standard approach used in email, HTTP, and so on. That's why at first sig=
ht,
> it may look somewhat unusual. And that's why there may be a need for some
> additional effort when converting from another protocol in a gateway,
> because textual data and binary data have to be separated.
>
> But that's not because of JavaScript. Most modern programming languages u=
se
> a single encoding for all their text internally, and separate text and
> binary. The only exception I know about is Ruby, and even in Ruby it's mu=
ch
> easier to write programs that use a single encoding (UTF-8) for all their
> text than to write programs where each chunk of text is in a different
> encoding.

Thanks. Finally I "solved" my issue by inspecting the SIP message
before sending it via WebSocket to the web browser. The websocket
server is written in Ruby, so basically I do (~pseudocode):

if ( sip_msg.force_encoding(::Encoding::UTF_8).valid_encoding? )
  send_text_frame( sip_msg )
else
  send_binary_frame( sip_msg )
end

So it generates a text or binary frame depending on the content of the
SIP message, and I'm done :)

Now I must deal in client side (JS) as the SIP parser assumes that the
received data is a String. But when a binary message arrives it can be
Blob or ArrayBuffer (seteable via the WebSocket API). Not sure if I
can convert a Blob or ArrayBuffer object containing non valid UTF-8
symbols into a JS String, but that is another battle :)

Thanks a lot.


--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From arman@noemax.com  Fri Nov  4 02:47:14 2011
Return-Path: <arman@noemax.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 A007521F8AB8 for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 02:47:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.104
X-Spam-Level: 
X-Spam-Status: No, score=-2.104 tagged_above=-999 required=5 tests=[AWL=0.195,  BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
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 brtnmxX5HSHw for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 02:47:14 -0700 (PDT)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by ietfa.amsl.com (Postfix) with ESMTP id C2D6521F8AB0 for <hybi@ietf.org>; Fri,  4 Nov 2011 02:47:12 -0700 (PDT)
Received: from ArmanLaptop by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id NUZ24208; Fri, 04 Nov 2011 11:47:08 +0200
From: "Arman Djusupov" <arman@noemax.com>
To: "'Tobias Oberstein'" <tobias.oberstein@tavendo.de>, =?UTF-8?Q?'I=C3=B1aki_Baz_Castillo'?= <ibc@aliax.net>
References: <002201cc9945$98696960$c93c3c20$@noemax.com>	<4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com>	<CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com>	<002701cc9962$eb8776b0$c2966410$@noemax.com>	<CALiegfnpX230pAJgZXS4=T2pCX9pwhurSw1L4uaUNrggezn+Gg@mail.gmail.com>	<000801cc99fd$bdcd5d70$39681850$@noemax.com>	<CALiegfkKhEPReZTOxm6wchW3mvnfovcCoSumvWxgBsGLZqiQ6Q@mail.gmail.com> <001201cc9a2b$780115b0$68034110$@noemax.com> <634914A010D0B943A035D226786325D42D0C0CDF38@EXVMBX020-12.exch020.serverdata.net>
In-Reply-To: <634914A010D0B943A035D226786325D42D0C0CDF38@EXVMBX020-12.exch020.serverdata.net>
Date: Fri, 4 Nov 2011 11:47:04 +0200
Message-ID: <000e01cc9ad6$b9ca3f20$2d5ebd60$@noemax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQH2ByfKsUFABchpiUfiw5MkelvqlgHOUuMiArZLHcUBy2YrdQHuryVWAgPL4MQAwc11EAJusB8SAYsaRPKU0a32AA==
Content-Language: en-us
Cc: hybi@ietf.org, 'Peter Thorson' <webmaster@zaphoyd.com>
Subject: Re: [hybi] Testsuite update case 7.1.5
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: Fri, 04 Nov 2011 09:47:14 -0000

> From: Tobias Oberstein [mailto:tobias.oberstein@tavendo.de]
> > That's why I believe that exchanging code 1000-OK, when data is=20
> > being deliberately left incomplete and knowingly discarded, is =
wrong.
>=20
> I would argue: all frames have been fully received/processed, so no=20
> data on the transport layer was lost or stuck in the TCP stack. The=20
> closing HS was clean.

Yes, "no data was lost in the TCP stack" and the TCP closure might be =
considered as clean at the TCP level.

But at the WS level the closure cannot be considered as clean since =
"frames have no semantic meaning" so a frame is just a fragment of data =
that cannot be interpreted outside of a message context; in other words =
it's like a TCP packet. When an unknown amount of frames are missing, =
including the final frame, both sides are aware that data is incomplete. =
This means that the connection was interrupted and the transfer was =
cancelled.

We don't have an appropriate close code for this... so IMO dropping the =
connection is one of the valid behaviors both from the client and from =
the server side. When interrupting the message the client does not need =
a reply from the server that it has received all data so far, otherwise =
the client could send a final fragment and wrap-up the message =
gracefully.

With best regards,
Arman


From ibc@aliax.net  Fri Nov  4 02:50:45 2011
Return-Path: <ibc@aliax.net>
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 D4B9B21F8ABE for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 02:50:45 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.643
X-Spam-Level: 
X-Spam-Status: No, score=-2.643 tagged_above=-999 required=5 tests=[AWL=0.034,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 aGLka7VNBVwy for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 02:50:45 -0700 (PDT)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id 4519D21F8AB8 for <hybi@ietf.org>; Fri,  4 Nov 2011 02:50:45 -0700 (PDT)
Received: by vcbfl11 with SMTP id fl11so2213122vcb.31 for <hybi@ietf.org>; Fri, 04 Nov 2011 02:50:44 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.220.199.2 with SMTP id eq2mr1091737vcb.103.1320400244524; Fri, 04 Nov 2011 02:50:44 -0700 (PDT)
Received: by 10.220.107.206 with HTTP; Fri, 4 Nov 2011 02:50:44 -0700 (PDT)
In-Reply-To: <000e01cc9ad6$b9ca3f20$2d5ebd60$@noemax.com>
References: <002201cc9945$98696960$c93c3c20$@noemax.com> <4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com> <CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com> <002701cc9962$eb8776b0$c2966410$@noemax.com> <CALiegfnpX230pAJgZXS4=T2pCX9pwhurSw1L4uaUNrggezn+Gg@mail.gmail.com> <000801cc99fd$bdcd5d70$39681850$@noemax.com> <CALiegfkKhEPReZTOxm6wchW3mvnfovcCoSumvWxgBsGLZqiQ6Q@mail.gmail.com> <001201cc9a2b$780115b0$68034110$@noemax.com> <634914A010D0B943A035D226786325D42D0C0CDF38@EXVMBX020-12.exch020.serverdata.net> <000e01cc9ad6$b9ca3f20$2d5ebd60$@noemax.com>
Date: Fri, 4 Nov 2011 10:50:44 +0100
Message-ID: <CALiegf=8aAVhJxqFqpwOcw_QB4gQt9N_QxTwC7OJXFAdTGXxzQ@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Arman Djusupov <arman@noemax.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org, Peter Thorson <webmaster@zaphoyd.com>
Subject: Re: [hybi] Testsuite update case 7.1.5
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: Fri, 04 Nov 2011 09:50:45 -0000

2011/11/4 Arman Djusupov <arman@noemax.com>:
> Yes, "no data was lost in the TCP stack" and the TCP closure might be con=
sidered as clean at the TCP level.
>
> But at the WS level the closure cannot be considered as clean since "fram=
es have no semantic meaning" so a frame is just a fragment of data that can=
not be interpreted outside of a message context; in other words it's like a=
 TCP packet. When an unknown amount of frames are missing, including the fi=
nal frame, both sides are aware that data is incomplete. This means that th=
e connection was interrupted and the transfer was cancelled.

I must agree.

In case the data application is sent via different WS *messages* and
the client interrupts it after a full ws message has been sent, then
there is no problem at WS level.

But in case a WS message splited into multiple WS frames is
interrupted, then IMHO there is a WS framing layer error so the WS
closure is abrupt rather than clean.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From tobias.oberstein@tavendo.de  Fri Nov  4 03:02:36 2011
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 1249321F8B94 for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 03:02:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.423
X-Spam-Level: 
X-Spam-Status: No, score=-2.423 tagged_above=-999 required=5 tests=[AWL=-0.123, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
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 usb9oF5GOjox for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 03:02:35 -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 6EE3521F8B84 for <hybi@ietf.org>; Fri,  4 Nov 2011 03:02:35 -0700 (PDT)
Received: from EXVMBX020-12.exch020.serverdata.net ([169.254.3.235]) by EXHUB020-3.exch020.serverdata.net ([206.225.164.30]) with mapi; Fri, 4 Nov 2011 03:02:34 -0700
From: Tobias Oberstein <tobias.oberstein@tavendo.de>
To: =?utf-8?B?ScOxYWtpIEJheiBDYXN0aWxsbw==?= <ibc@aliax.net>, Arman Djusupov <arman@noemax.com>
Date: Fri, 4 Nov 2011 03:02:30 -0700
Thread-Topic: [hybi] Testsuite update case 7.1.5
Thread-Index: Acya1ztoDLuDQ9mWQmG+tDjj4ubd4QAAGNEA
Message-ID: <634914A010D0B943A035D226786325D42D0C0CE016@EXVMBX020-12.exch020.serverdata.net>
References: <002201cc9945$98696960$c93c3c20$@noemax.com> <4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com> <CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com> <002701cc9962$eb8776b0$c2966410$@noemax.com> <CALiegfnpX230pAJgZXS4=T2pCX9pwhurSw1L4uaUNrggezn+Gg@mail.gmail.com> <000801cc99fd$bdcd5d70$39681850$@noemax.com> <CALiegfkKhEPReZTOxm6wchW3mvnfovcCoSumvWxgBsGLZqiQ6Q@mail.gmail.com> <001201cc9a2b$780115b0$68034110$@noemax.com> <634914A010D0B943A035D226786325D42D0C0CDF38@EXVMBX020-12.exch020.serverdata.net> <000e01cc9ad6$b9ca3f20$2d5ebd60$@noemax.com> <CALiegf=8aAVhJxqFqpwOcw_QB4gQt9N_QxTwC7OJXFAdTGXxzQ@mail.gmail.com>
In-Reply-To: <CALiegf=8aAVhJxqFqpwOcw_QB4gQt9N_QxTwC7OJXFAdTGXxzQ@mail.gmail.com>
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="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Cc: "hybi@ietf.org" <hybi@ietf.org>, Peter Thorson <webmaster@zaphoyd.com>
Subject: Re: [hybi] Testsuite update case 7.1.5
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: Fri, 04 Nov 2011 10:02:36 -0000

PiA+IFllcywgIm5vIGRhdGEgd2FzIGxvc3QgaW4gdGhlIFRDUCBzdGFjayIgYW5kIHRoZSBUQ1Ag
Y2xvc3VyZSBtaWdodCBiZQ0KPiBjb25zaWRlcmVkIGFzIGNsZWFuIGF0IHRoZSBUQ1AgbGV2ZWwu
DQo+ID4NCj4gPiBCdXQgYXQgdGhlIFdTIGxldmVsIHRoZSBjbG9zdXJlIGNhbm5vdCBiZSBjb25z
aWRlcmVkIGFzIGNsZWFuIHNpbmNlICJmcmFtZXMNCj4gaGF2ZSBubyBzZW1hbnRpYyBtZWFuaW5n
IiBzbyBhIGZyYW1lIGlzIGp1c3QgYSBmcmFnbWVudCBvZiBkYXRhIHRoYXQgY2Fubm90DQo+IGJl
IGludGVycHJldGVkIG91dHNpZGUgb2YgYSBtZXNzYWdlIGNvbnRleHQ7IGluIG90aGVyIHdvcmRz
IGl0J3MgbGlrZSBhIFRDUA0KPiBwYWNrZXQuIFdoZW4gYW4gdW5rbm93biBhbW91bnQgb2YgZnJh
bWVzIGFyZSBtaXNzaW5nLCBpbmNsdWRpbmcgdGhlIGZpbmFsDQo+IGZyYW1lLCBib3RoIHNpZGVz
IGFyZSBhd2FyZSB0aGF0IGRhdGEgaXMgaW5jb21wbGV0ZS4gVGhpcyBtZWFucyB0aGF0IHRoZQ0K
PiBjb25uZWN0aW9uIHdhcyBpbnRlcnJ1cHRlZCBhbmQgdGhlIHRyYW5zZmVyIHdhcyBjYW5jZWxs
ZWQuDQo+IA0KPiBJIG11c3QgYWdyZWUuDQo+IA0KPiBJbiBjYXNlIHRoZSBkYXRhIGFwcGxpY2F0
aW9uIGlzIHNlbnQgdmlhIGRpZmZlcmVudCBXUyAqbWVzc2FnZXMqIGFuZCB0aGUNCj4gY2xpZW50
IGludGVycnVwdHMgaXQgYWZ0ZXIgYSBmdWxsIHdzIG1lc3NhZ2UgaGFzIGJlZW4gc2VudCwgdGhl
biB0aGVyZSBpcyBubw0KPiBwcm9ibGVtIGF0IFdTIGxldmVsLg0KPiANCj4gQnV0IGluIGNhc2Ug
YSBXUyBtZXNzYWdlIHNwbGl0ZWQgaW50byBtdWx0aXBsZSBXUyBmcmFtZXMgaXMgaW50ZXJydXB0
ZWQsIHRoZW4NCj4gSU1ITyB0aGVyZSBpcyBhIFdTIGZyYW1pbmcgbGF5ZXIgZXJyb3Igc28gdGhl
IFdTIGNsb3N1cmUgaXMgYWJydXB0IHJhdGhlcg0KPiB0aGFuIGNsZWFuLg0KDQpObywgSSB3b3Vs
ZCBub3QgYWdyZWUuIA0KDQpXUyBjb25uZWN0aW9uIGNsb3NlZCBjbGVhbmx5ID0gZnVsbCBjbG9z
aW5nIGhhbmRzaGFrZSB3YXMgcGVyZm9ybWVkIGFuZA0KdGhlIFRDUCB3YXMgZHJvcHBlZCBieSB0
aGUgY29ycmVjdCBwZWVyIChzZXJ2ZXIpLg0KDQpXaGV0aGVyIHRoZSBXUyBjb25uZWN0aW9uIHdh
cyBjbG9zZWQgaW4gdGhlIG1pZGRsZSBvZiBhIGZyYWdtZW50ZWQNCm1lc3NhZ2Ugb3Igbm90IGRv
ZXMgbm90IGFmZmVjdCAid2FzQ2xlYW4iLg0KDQpXaGljaCBjbG9zZSBjb2RlIHNob3VsZCBiZSB1
c2VkIGluIGNhc2Ugb2YgY2xvc2UgaW4gbWlkZGxlIG9mIGZyYWdtZW50ZWQNCm1lc3NhZ2UgaXMg
YSBkaWZmZXJlbnQgcXVlc3Rpb24sIGFuZCBJIGFncmVlIHdpdGggQXJtYW4gdGhhdCBhIG1vcmUN
CnNwZWNpZmljIGNvZGUgaXMgbm90IGF2YWlsYWJsZSBmb3IgdGhhdC4NCg0KSW4gb3RoZXIgd29y
ZHM6IGV2ZW4gaWYgdGhlcmUgd2FzIGEgY29kZSBsaWtlIGkuZS4gMTAxNSA9ICJjbG9zZWQgaW4g
bWlkZGxlIG9mIG1lc3NhZ2UiLA0KdGhlIGNsb3NlIHdvdWxkIHN0aWxsIGJlIGNsZWFuLg0KDQo=

From ibc@aliax.net  Fri Nov  4 03:25:33 2011
Return-Path: <ibc@aliax.net>
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 DB9CF21F8C35 for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 03:25:33 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.643
X-Spam-Level: 
X-Spam-Status: No, score=-2.643 tagged_above=-999 required=5 tests=[AWL=0.034,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 rXFh4PoS+7rs for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 03:25:33 -0700 (PDT)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id 4766A21F8C15 for <hybi@ietf.org>; Fri,  4 Nov 2011 03:25:33 -0700 (PDT)
Received: by vcbfl11 with SMTP id fl11so2236792vcb.31 for <hybi@ietf.org>; Fri, 04 Nov 2011 03:25:30 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.34.100 with SMTP id y4mr14099664vdi.66.1320402330277; Fri, 04 Nov 2011 03:25:30 -0700 (PDT)
Received: by 10.220.107.206 with HTTP; Fri, 4 Nov 2011 03:25:30 -0700 (PDT)
In-Reply-To: <634914A010D0B943A035D226786325D42D0C0CE016@EXVMBX020-12.exch020.serverdata.net>
References: <002201cc9945$98696960$c93c3c20$@noemax.com> <4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com> <CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com> <002701cc9962$eb8776b0$c2966410$@noemax.com> <CALiegfnpX230pAJgZXS4=T2pCX9pwhurSw1L4uaUNrggezn+Gg@mail.gmail.com> <000801cc99fd$bdcd5d70$39681850$@noemax.com> <CALiegfkKhEPReZTOxm6wchW3mvnfovcCoSumvWxgBsGLZqiQ6Q@mail.gmail.com> <001201cc9a2b$780115b0$68034110$@noemax.com> <634914A010D0B943A035D226786325D42D0C0CDF38@EXVMBX020-12.exch020.serverdata.net> <000e01cc9ad6$b9ca3f20$2d5ebd60$@noemax.com> <CALiegf=8aAVhJxqFqpwOcw_QB4gQt9N_QxTwC7OJXFAdTGXxzQ@mail.gmail.com> <634914A010D0B943A035D226786325D42D0C0CE016@EXVMBX020-12.exch020.serverdata.net>
Date: Fri, 4 Nov 2011 11:25:30 +0100
Message-ID: <CALiegfmT4yygGu+tmMPbtncrk30kPM1+-QX=zGUNTjy=2hoHOA@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: Tobias Oberstein <tobias.oberstein@tavendo.de>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: "hybi@ietf.org" <hybi@ietf.org>, Peter Thorson <webmaster@zaphoyd.com>
Subject: Re: [hybi] Testsuite update case 7.1.5
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: Fri, 04 Nov 2011 10:25:34 -0000

2011/11/4 Tobias Oberstein <tobias.oberstein@tavendo.de>:
> No, I would not agree.
>
> WS connection closed cleanly =3D full closing handshake was performed and
> the TCP was dropped by the correct peer (server).
>
> Whether the WS connection was closed in the middle of a fragmented
> message or not does not affect "wasClean".

Hi Tobias, please re-check the response of Arman:

> TCP is not aware about how much data an application plans to exchange. Bu=
t an application is required to follow specific steps in order to ensure th=
at a TCP connection is closed gracefully, without data loss or errors from =
the socket API. From the perspective of the socket API the closure is grace=
ful when both sides stop writing, call shutdown(), then recv() returns 0 an=
d finally the socket handles are closed. If there were no errors while perf=
orming those steps, then this is a reasonable indication that no data was d=
iscarded and both sides are closing the connection on mutual agreement.


Let me rephrase the same for WebSocket:

> WebSocket is not aware about how much data an application plans to exchan=
ge. But an application is required to follow specific steps in order to ens=
ure that a WebSocket connection is closed gracefully, without data loss or =
errors from the socket API. From the perspective of the socket API the clos=
ure is graceful when both sides stop sending frames and send a close frame.=
 If there were no errors while performing those steps, then this is a reaso=
nable indication that no data was discarded and both sides are closing the =
connection on mutual agreement.



--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From arman@noemax.com  Fri Nov  4 04:15:44 2011
Return-Path: <arman@noemax.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 3512A21F8C0D for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 04:15:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.143
X-Spam-Level: 
X-Spam-Status: No, score=-2.143 tagged_above=-999 required=5 tests=[AWL=0.156,  BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
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 Zjp9vnPjk+Ft for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 04:15:43 -0700 (PDT)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by ietfa.amsl.com (Postfix) with ESMTP id 0AB7A21F8B81 for <hybi@ietf.org>; Fri,  4 Nov 2011 04:15:42 -0700 (PDT)
Received: from ArmanLaptop by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id NWT89835; Fri, 04 Nov 2011 13:15:35 +0200
From: "Arman Djusupov" <arman@noemax.com>
To: "'Tobias Oberstein'" <tobias.oberstein@tavendo.de>, =?UTF-8?Q?'I=C3=B1aki_Baz_Castillo'?= <ibc@aliax.net>
References: <002201cc9945$98696960$c93c3c20$@noemax.com>	<4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com>	<CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com>	<002701cc9962$eb8776b0$c2966410$@noemax.com>	<CALiegfnpX230pAJgZXS4=T2pCX9pwhurSw1L4uaUNrggezn+Gg@mail.gmail.com>	<000801cc99fd$bdcd5d70$39681850$@noemax.com>	<CALiegfkKhEPReZTOxm6wchW3mvnfovcCoSumvWxgBsGLZqiQ6Q@mail.gmail.com>	<001201cc9a2b$780115b0$68034110$@noemax.com>	<634914A010D0B943A035D226786325D42D0C0CDF38@EXVMBX020-12.exch020.serverdata.net>	<000e01cc9ad6$b9ca3f20$2d5ebd60$@noemax.com> <CALiegf=8aAVhJxqFqpwOcw_QB4gQt9N_QxTwC7OJXFAdTGXxzQ@mail.gmail.com> <634914A010D0B943A035D226786325D42D0C0CE016@EXVMBX020-12.exch020.serverdata.net>
In-Reply-To: <634914A010D0B943A035D226786325D42D0C0CE016@EXVMBX020-12.exch020.serverdata.net>
Date: Fri, 4 Nov 2011 13:15:31 +0200
Message-ID: <001301cc9ae3$157e3c70$407ab550$@noemax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQH2ByfKsUFABchpiUfiw5MkelvqlgHOUuMiArZLHcUBy2YrdQHuryVWAgPL4MQAwc11EAJusB8SAYsaRPICFAeU6wLmaknXAfVp19+UmkdaIA==
Content-Language: en-us
Cc: hybi@ietf.org, 'Peter Thorson' <webmaster@zaphoyd.com>
Subject: Re: [hybi] Testsuite update case 7.1.5
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: Fri, 04 Nov 2011 11:15:44 -0000

> From: Tobias Oberstein [mailto:tobias.oberstein@tavendo.de]
> In other words: even if there was a code like i.e. 1015 =3D "closed in =

> middle of message", the close would still be clean.

At least both sides would be in agreement that the connection was closed =
in the middle of fragmented message.

But the closure wouldn't be clean as there would still be the error =
condition on the receiving side and the WS implementation would have to =
make sure that the application code is notified that the message =
fragments received up to now are not considered as a complete message.

Otherwise it would be the responsibility of the application to keep =
track of the current message state and whether the final frame is =
received. But I believe that since message fragmentation is a feature of =
the protocol, rather than application logic, it's the responsibility of =
the protocol to flag and report such conditions, so we can't say this is =
not protocol error.

Let's simply imagine that the developer wrote the application using a =
push API implementation and so handles the OnFrame events. When the =
OnClose event would be triggered, it would not be evident (btw even spec =
doesn't make this clear) whether the OnClose event after the OnFrame =
event means that the message is interrupted or complete, especially if =
OnClose would not have any error code.

With best regards,
Arman


From jat@google.com  Fri Nov  4 07:27:39 2011
Return-Path: <jat@google.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 B003321F8BA2 for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 07:27:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.62
X-Spam-Level: 
X-Spam-Status: No, score=-102.62 tagged_above=-999 required=5 tests=[AWL=0.058, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, 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 LYroY8++TpO9 for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 07:27:39 -0700 (PDT)
Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by ietfa.amsl.com (Postfix) with ESMTP id 1DF8221F8BA7 for <hybi@ietf.org>; Fri,  4 Nov 2011 07:27:38 -0700 (PDT)
Received: by ywt2 with SMTP id 2so2930667ywt.31 for <hybi@ietf.org>; Fri, 04 Nov 2011 07:27:38 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding:x-system-of-record; bh=YQynNvzfL8xAxqyLFuuespBmkK3ysMwPG3/DwICSAX8=; b=YxEEgMzK+6RI30M1wz+BJkbm54ZEydv8xXY1ILcu5yYAuHJIwIbITF7mSA+9XHAVRm rEXlzidmWOF2PKp337Gg==
Received: by 10.150.139.9 with SMTP id m9mr15161264ybd.104.1320416858506; Fri, 04 Nov 2011 07:27:38 -0700 (PDT)
Received: by 10.150.139.9 with SMTP id m9mr15161244ybd.104.1320416858284; Fri, 04 Nov 2011 07:27:38 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.197.9 with HTTP; Fri, 4 Nov 2011 07:27:17 -0700 (PDT)
In-Reply-To: <CALiegf=LFMJ5e6i7wG=seEi7XvqUGiRuPS-7tG+sZC3=Zf7UzA@mail.gmail.com>
References: <CALiegfmgYSFvz0XRNR+YWQkb7CVg0WOK4bb=Od54t-Y9vQQbMA@mail.gmail.com> <20111101072919.GB12765@1wt.eu> <CALiegfnWD4-NNCFO898Xne4j+X1cnZXJ85hJMZT3J8+UDt94Tg@mail.gmail.com> <CAH_y2NHH_zmAQa4BgGpjt5PWttmO44yxN_e3-2qE74sLEOpKmA@mail.gmail.com> <CALiegf=LFMJ5e6i7wG=seEi7XvqUGiRuPS-7tG+sZC3=Zf7UzA@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Fri, 4 Nov 2011 10:27:17 -0400
Message-ID: <CABLsOLBKC0i1LWnjzMynxLB1AhDvmE5sOC1_qmNDOnFUt-fz7A@mail.gmail.com>
To: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Cc: hybi@ietf.org, Greg Wilkins <gregw@intalio.com>
Subject: Re: [hybi] How are Cookies added?
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: Fri, 04 Nov 2011 14:27:39 -0000

On Fri, Nov 4, 2011 at 5:28 AM, I=C3=B1aki Baz Castillo <ibc@aliax.net> wro=
te:
> But AJAX does not allow to contact a HTTP server different than the
> domain from which the JS is downloaded, am I wrong?

See CORS.

--=20
John A. Tamplin
Software Engineer (GWT), Google

From jat@google.com  Fri Nov  4 09:01:34 2011
Return-Path: <jat@google.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 E33D121F8B04 for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 09:01:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.555
X-Spam-Level: 
X-Spam-Status: No, score=-102.555 tagged_above=-999 required=5 tests=[AWL=-0.030, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, SARE_SUB_ENC_UTF8=0.152, 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 tBg0vb7TeLce for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 09:01:34 -0700 (PDT)
Received: from mail-yw0-f44.google.com (mail-yw0-f44.google.com [209.85.213.44]) by ietfa.amsl.com (Postfix) with ESMTP id 60D2A21F8B02 for <hybi@ietf.org>; Fri,  4 Nov 2011 09:01:34 -0700 (PDT)
Received: by ywt2 with SMTP id 2so3031802ywt.31 for <hybi@ietf.org>; Fri, 04 Nov 2011 09:01:34 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:x-system-of-record; bh=7AnT8VKtgjvHsqb2FS4kjuid9s3/0XDslqWjKQfwOis=; b=YVepnKXGACLguH4UqB9tiSdQ0DczH8w4WWZKPlFpz6ZuvYlL+5zXQJdzTymlvoUte3 SxoPG00NdqhyWLiN4/sA==
Received: by 10.150.203.3 with SMTP id a3mr10306669ybg.74.1320422493782; Fri, 04 Nov 2011 09:01:33 -0700 (PDT)
Received: by 10.150.203.3 with SMTP id a3mr10306601ybg.74.1320422493122; Fri, 04 Nov 2011 09:01:33 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.150.197.9 with HTTP; Fri, 4 Nov 2011 09:01:12 -0700 (PDT)
In-Reply-To: <CALiegf=myTF1FkxL6A-zVE+9rV_jay-8hsVT41SLiFXRkgzB0g@mail.gmail.com>
References: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com> <CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com> <CALiegf=L62kmBszt8pkGbeeB+PgzKkoT2JxLTxJAgmrLyqLR6A@mail.gmail.com> <CABLsOLDnyESFBxE356yQEANS6dfGTL74pROmN1oeG9RdBi4P8Q@mail.gmail.com> <CALiegfmhR=unUKqiu_KiYgvV_AaJEUSJ_4KxwKhNX1qv1NuU+Q@mail.gmail.com> <CABLsOLDvJ8dFf-7-65YLKTeb4TMDuk+L7x7kwihKaNs_2T45dg@mail.gmail.com> <CALiegf=-c795zSSJkZj+6gfFUqaTi=BC0VhBv8p-9fGBhKN4Dw@mail.gmail.com> <4EB099B4.6030304@it.aoyama.ac.jp> <CALiegfnDZy51AqGrj5m+Ch9x5jSWx4veg3nAJtYh7ZPD7CMU9Q@mail.gmail.com> <4EB39F9F.7010301@it.aoyama.ac.jp> <CALiegf=myTF1FkxL6A-zVE+9rV_jay-8hsVT41SLiFXRkgzB0g@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Fri, 4 Nov 2011 12:01:12 -0400
Message-ID: <CABLsOLASNsUvs_LcG8nG=YuJYN8Xo0YCBs+PdVNX=FSiLTeNJg@mail.gmail.com>
To: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
Content-Type: multipart/alternative; boundary=000e0cd2e72ea7f2f104b0ead1fd
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
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: Fri, 04 Nov 2011 16:01:35 -0000

--000e0cd2e72ea7f2f104b0ead1fd
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Fri, Nov 4, 2011 at 5:37 AM, I=C3=B1aki Baz Castillo <ibc@aliax.net> wro=
te:

> Now I must deal in client side (JS) as the SIP parser assumes that the
> received data is a String. But when a binary message arrives it can be
> Blob or ArrayBuffer (seteable via the WebSocket API). Not sure if I
> can convert a Blob or ArrayBuffer object containing non valid UTF-8
> symbols into a JS String, but that is another battle :)
>

You don't want to store binary data in Strings -- that is the whole point
behind ArrayBuffer.

AFAIK, you have to do the UTF8 encode/decode yourself (via getUInt8 etc) --
it seems like DataView should have some utilities for extracting/inserting
strings into the underlying ArrayBuffer.

--=20
John A. Tamplin
Software Engineer (GWT), Google

--000e0cd2e72ea7f2f104b0ead1fd
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div class=3D"gmail_quote">On Fri, Nov 4, 2011 at 5:37 AM, I=C3=B1aki Baz C=
astillo <span dir=3D"ltr">&lt;<a href=3D"mailto:ibc@aliax.net" target=3D"_b=
lank">ibc@aliax.net</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quo=
te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"=
>


Now I must deal in client side (JS) as the SIP parser assumes that the<br>
received data is a String. But when a binary message arrives it can be<br>
Blob or ArrayBuffer (seteable via the WebSocket API). Not sure if I<br>
can convert a Blob or ArrayBuffer object containing non valid UTF-8<br>
symbols into a JS String, but that is another battle :)<br></blockquote><di=
v><br></div><div>You don&#39;t want to store binary data in Strings -- that=
 is the whole point behind ArrayBuffer.</div><div><br></div><div>AFAIK, you=
 have to do the UTF8 encode/decode yourself (via getUInt8 etc) -- it seems =
like DataView should have some utilities for extracting/inserting strings i=
nto the underlying ArrayBuffer.</div>

</div><div><br></div>-- <br>John A. Tamplin<br>Software Engineer (GWT), Goo=
gle<br>

--000e0cd2e72ea7f2f104b0ead1fd--

From tobias.oberstein@tavendo.de  Fri Nov  4 10:27:24 2011
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 81C3721F8A96 for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 10:27:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.416
X-Spam-Level: 
X-Spam-Status: No, score=-2.416 tagged_above=-999 required=5 tests=[AWL=-0.117, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
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 c+H1iwBjdBnx for <hybi@ietfa.amsl.com>; Fri,  4 Nov 2011 10:27:24 -0700 (PDT)
Received: from EXHUB020-1.exch020.serverdata.net (exhub020-1.exch020.serverdata.net [206.225.164.28]) by ietfa.amsl.com (Postfix) with ESMTP id E00BA21F8A71 for <hybi@ietf.org>; Fri,  4 Nov 2011 10:27:23 -0700 (PDT)
Received: from EXVMBX020-12.exch020.serverdata.net ([169.254.3.235]) by EXHUB020-1.exch020.serverdata.net ([206.225.164.28]) with mapi; Fri, 4 Nov 2011 10:27:23 -0700
From: Tobias Oberstein <tobias.oberstein@tavendo.de>
To: Arman Djusupov <arman@noemax.com>, =?utf-8?B?J0nDsWFraSBCYXogQ2FzdGlsbG8n?= <ibc@aliax.net>
Date: Fri, 4 Nov 2011 10:27:20 -0700
Thread-Topic: [hybi] Testsuite update case 7.1.5
Thread-Index: AQH2ByfKsUFABchpiUfiw5MkelvqlgHOUuMiArZLHcUBy2YrdQHuryVWAgPL4MQAwc11EAJusB8SAYsaRPICFAeU6wLmaknXAfVp19+UmkdaIIAAZzcg
Message-ID: <634914A010D0B943A035D226786325D42D0C0CE248@EXVMBX020-12.exch020.serverdata.net>
References: <002201cc9945$98696960$c93c3c20$@noemax.com> <4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com> <CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com> <002701cc9962$eb8776b0$c2966410$@noemax.com> <CALiegfnpX230pAJgZXS4=T2pCX9pwhurSw1L4uaUNrggezn+Gg@mail.gmail.com> <000801cc99fd$bdcd5d70$39681850$@noemax.com> <CALiegfkKhEPReZTOxm6wchW3mvnfovcCoSumvWxgBsGLZqiQ6Q@mail.gmail.com> <001201cc9a2b$780115b0$68034110$@noemax.com> <634914A010D0B943A035D226786325D42D0C0CDF38@EXVMBX020-12.exch020.serverdata.net> <000e01cc9ad6$b9ca3f20$2d5ebd60$@noemax.com> <CALiegf=8aAVhJxqFqpwOcw_QB4gQt9N_QxTwC7OJXFAdTGXxzQ@mail.gmail.com> <634914A010D0B943A035D226786325D42D0C0CE016@EXVMBX020-12.exch020.serverdata.net> <001301cc9ae3$157e3c70$407ab550$@noemax.com>
In-Reply-To: <001301cc9ae3$157e3c70$407ab550$@noemax.com>
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="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
Cc: "hybi@ietf.org" <hybi@ietf.org>, 'Peter Thorson' <webmaster@zaphoyd.com>
Subject: Re: [hybi] Testsuite update case 7.1.5
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: Fri, 04 Nov 2011 17:27:24 -0000

PiA+IEluIG90aGVyIHdvcmRzOiBldmVuIGlmIHRoZXJlIHdhcyBhIGNvZGUgbGlrZSBpLmUuIDEw
MTUgPSAiY2xvc2VkIGluDQo+ID4gbWlkZGxlIG9mIG1lc3NhZ2UiLCB0aGUgY2xvc2Ugd291bGQg
c3RpbGwgYmUgY2xlYW4uDQo+IA0KPiBBdCBsZWFzdCBib3RoIHNpZGVzIHdvdWxkIGJlIGluIGFn
cmVlbWVudCB0aGF0IHRoZSBjb25uZWN0aW9uIHdhcyBjbG9zZWQgaW4NCj4gdGhlIG1pZGRsZSBv
ZiBmcmFnbWVudGVkIG1lc3NhZ2UuDQoNCklmIHRoZXJlIGlzIGEgY2hhbmNlIGR1cmluZyBBVVRI
NDggYW5kIHN1cHBvcnQgYnkgdGhlIFdHLCB0aGVuIG1heWJlIGFkZA0KDQpjbG9zZSBjb2RlIDEw
MTUgPSAiY2xvc2VkIGluIG1pZGRsZSBvZiBtZXNzYWdlIg0KDQo+IEJ1dCB0aGUgY2xvc3VyZSB3
b3VsZG4ndCBiZSBjbGVhbiBhcyB0aGVyZSB3b3VsZCBzdGlsbCBiZSB0aGUgZXJyb3IgY29uZGl0
aW9uDQo+IG9uIHRoZSByZWNlaXZpbmcgc2lkZSBhbmQgdGhlIFdTIGltcGxlbWVudGF0aW9uIHdv
dWxkIGhhdmUgdG8gbWFrZSBzdXJlDQo+IHRoYXQgdGhlIGFwcGxpY2F0aW9uIGNvZGUgaXMgbm90
aWZpZWQgdGhhdCB0aGUgbWVzc2FnZSBmcmFnbWVudHMgcmVjZWl2ZWQgdXANCj4gdG8gbm93IGFy
ZSBub3QgY29uc2lkZXJlZCBhcyBhIGNvbXBsZXRlIG1lc3NhZ2UuDQoNCkEgbWVzc2FnZSBiYXNl
ZCBBUEkgd291bGQgbm90IGZpcmUgb25NZXNzYWdlKCksIGJ1dCBvbkNsb3NlKCkgd2l0aA0KY29k
ZSAxMDAwIG9yIC0gYmV0dGVyIC0gMTAxNSBhcyBhYm92ZSwgc28gYXBwbGljYXRpb24gY2FuIHRh
a2Ugbm90aWNlLg0KDQpBdCBsZWFzdCBmb3IgQXV0b2JhaG4sIG9uQ2xvc2UoKSBhbHNvIHByb3Zp
ZGVzICJ3YXNDbGVhbiIgYXMgdGhlIEpTIEFQSS4NCkFuZCB0aGF0IGRlZmluaXRpb24gb2Ygd2Fz
Q2xlYW4gPSBjbG9zaW5nIEhTIHBlcmZvcm1lZCArIFRDUCBkcm9wcGVkIGJ5DQpjb3JyZWN0IHBl
ZXIuDQoNCj4gTGV0J3Mgc2ltcGx5IGltYWdpbmUgdGhhdCB0aGUgZGV2ZWxvcGVyIHdyb3RlIHRo
ZSBhcHBsaWNhdGlvbiB1c2luZyBhIHB1c2gNCj4gQVBJIGltcGxlbWVudGF0aW9uIGFuZCBzbyBo
YW5kbGVzIHRoZSBPbkZyYW1lIGV2ZW50cy4gV2hlbiB0aGUgT25DbG9zZQ0KPiBldmVudCB3b3Vs
ZCBiZSB0cmlnZ2VyZWQsIGl0IHdvdWxkIG5vdCBiZSBldmlkZW50IChidHcgZXZlbiBzcGVjIGRv
ZXNuJ3QNCj4gbWFrZSB0aGlzIGNsZWFyKSB3aGV0aGVyIHRoZSBPbkNsb3NlIGV2ZW50IGFmdGVy
IHRoZSBPbkZyYW1lIGV2ZW50IG1lYW5zDQo+IHRoYXQgdGhlIG1lc3NhZ2UgaXMgaW50ZXJydXB0
ZWQgb3IgY29tcGxldGUsIGVzcGVjaWFsbHkgaWYgT25DbG9zZSB3b3VsZCBub3QNCj4gaGF2ZSBh
bnkgZXJyb3IgY29kZS4NCg0KVGhlIGZyYW1lIGJhc2VkIEFQSSBvZiBBdXRvYmFobiBmaXJlcyBv
bkZyYW1lKCkgcGVyIGZyYW1lLCBhbmQgb25NZXNzYWdlRW5kKCkNCmFmdGVyIHRoZSBsYXN0IGZy
YW1lLCBzbyB0aGUgYXBwIGNhbiB0cmFjay4NCg0KDQo=

From ibc@aliax.net  Sat Nov  5 06:45:13 2011
Return-Path: <ibc@aliax.net>
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 1870321F85F1 for <hybi@ietfa.amsl.com>; Sat,  5 Nov 2011 06:45:13 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.635
X-Spam-Level: 
X-Spam-Status: No, score=-2.635 tagged_above=-999 required=5 tests=[AWL=0.042,  BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 WmXEzzMGLuFb for <hybi@ietfa.amsl.com>; Sat,  5 Nov 2011 06:45:12 -0700 (PDT)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id 7B9C021F85DB for <hybi@ietf.org>; Sat,  5 Nov 2011 06:45:12 -0700 (PDT)
Received: by vcbfl11 with SMTP id fl11so3332512vcb.31 for <hybi@ietf.org>; Sat, 05 Nov 2011 06:45:12 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.52.33.239 with SMTP id u15mr5662840vdi.49.1320500712053; Sat, 05 Nov 2011 06:45:12 -0700 (PDT)
Received: by 10.220.107.206 with HTTP; Sat, 5 Nov 2011 06:45:12 -0700 (PDT)
In-Reply-To: <CABLsOLBKC0i1LWnjzMynxLB1AhDvmE5sOC1_qmNDOnFUt-fz7A@mail.gmail.com>
References: <CALiegfmgYSFvz0XRNR+YWQkb7CVg0WOK4bb=Od54t-Y9vQQbMA@mail.gmail.com> <20111101072919.GB12765@1wt.eu> <CALiegfnWD4-NNCFO898Xne4j+X1cnZXJ85hJMZT3J8+UDt94Tg@mail.gmail.com> <CAH_y2NHH_zmAQa4BgGpjt5PWttmO44yxN_e3-2qE74sLEOpKmA@mail.gmail.com> <CALiegf=LFMJ5e6i7wG=seEi7XvqUGiRuPS-7tG+sZC3=Zf7UzA@mail.gmail.com> <CABLsOLBKC0i1LWnjzMynxLB1AhDvmE5sOC1_qmNDOnFUt-fz7A@mail.gmail.com>
Date: Sat, 5 Nov 2011 14:45:12 +0100
Message-ID: <CALiegfkjSTyEqQhuipRh2Bya4ha98Tzo2D5mi2x3xs0akgtWvg@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org, Greg Wilkins <gregw@intalio.com>
Subject: Re: [hybi] How are Cookies added?
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, 05 Nov 2011 13:45:13 -0000

2011/11/4 John Tamplin <jat@google.com>:
> On Fri, Nov 4, 2011 at 5:28 AM, I=C3=B1aki Baz Castillo <ibc@aliax.net> w=
rote:
>> But AJAX does not allow to contact a HTTP server different than the
>> domain from which the JS is downloaded, am I wrong?
>
> See CORS.

Thanks, I missed that.

--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From ibc@aliax.net  Sat Nov  5 06:49:47 2011
Return-Path: <ibc@aliax.net>
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 4361D21F861E for <hybi@ietfa.amsl.com>; Sat,  5 Nov 2011 06:49:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.559
X-Spam-Level: 
X-Spam-Status: No, score=-2.559 tagged_above=-999 required=5 tests=[AWL=-0.034, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1, SARE_SUB_ENC_UTF8=0.152]
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 iRPuuzdaXnNI for <hybi@ietfa.amsl.com>; Sat,  5 Nov 2011 06:49:46 -0700 (PDT)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id B519721F85F1 for <hybi@ietf.org>; Sat,  5 Nov 2011 06:49:46 -0700 (PDT)
Received: by vcbfl11 with SMTP id fl11so3334256vcb.31 for <hybi@ietf.org>; Sat, 05 Nov 2011 06:49:45 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.220.115.208 with SMTP id j16mr1474418vcq.33.1320500985772; Sat, 05 Nov 2011 06:49:45 -0700 (PDT)
Received: by 10.220.107.206 with HTTP; Sat, 5 Nov 2011 06:49:45 -0700 (PDT)
In-Reply-To: <CABLsOLASNsUvs_LcG8nG=YuJYN8Xo0YCBs+PdVNX=FSiLTeNJg@mail.gmail.com>
References: <CALiegfkxMkGSuuJTnF5dZm0kyVmshARLn9uJjbv=aRf1VFR6Kg@mail.gmail.com> <CABLsOLCiKGOhi3DZvWdU1kuGS4YJQA23d24j9kN-+0zoAwhjAQ@mail.gmail.com> <CALiegf=L62kmBszt8pkGbeeB+PgzKkoT2JxLTxJAgmrLyqLR6A@mail.gmail.com> <CABLsOLDnyESFBxE356yQEANS6dfGTL74pROmN1oeG9RdBi4P8Q@mail.gmail.com> <CALiegfmhR=unUKqiu_KiYgvV_AaJEUSJ_4KxwKhNX1qv1NuU+Q@mail.gmail.com> <CABLsOLDvJ8dFf-7-65YLKTeb4TMDuk+L7x7kwihKaNs_2T45dg@mail.gmail.com> <CALiegf=-c795zSSJkZj+6gfFUqaTi=BC0VhBv8p-9fGBhKN4Dw@mail.gmail.com> <4EB099B4.6030304@it.aoyama.ac.jp> <CALiegfnDZy51AqGrj5m+Ch9x5jSWx4veg3nAJtYh7ZPD7CMU9Q@mail.gmail.com> <4EB39F9F.7010301@it.aoyama.ac.jp> <CALiegf=myTF1FkxL6A-zVE+9rV_jay-8hsVT41SLiFXRkgzB0g@mail.gmail.com> <CABLsOLASNsUvs_LcG8nG=YuJYN8Xo0YCBs+PdVNX=FSiLTeNJg@mail.gmail.com>
Date: Sat, 5 Nov 2011 14:49:45 +0100
Message-ID: <CALiegfmL+MP16nAxpnPWb-71TD6AosE37Cu2XY6qXn2+W+MOmg@mail.gmail.com>
From: =?UTF-8?Q?I=C3=B1aki_Baz_Castillo?= <ibc@aliax.net>
To: John Tamplin <jat@google.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Now from the experience: utf-8/binary frame type is a BAD idea
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, 05 Nov 2011 13:49:47 -0000

2011/11/4 John Tamplin <jat@google.com>:
> On Fri, Nov 4, 2011 at 5:37 AM, I=C3=B1aki Baz Castillo <ibc@aliax.net> w=
rote:
>>
>> Now I must deal in client side (JS) as the SIP parser assumes that the
>> received data is a String. But when a binary message arrives it can be
>> Blob or ArrayBuffer (seteable via the WebSocket API). Not sure if I
>> can convert a Blob or ArrayBuffer object containing non valid UTF-8
>> symbols into a JS String, but that is another battle :)
>
> You don't want to store binary data in Strings -- that is the whole point
> behind ArrayBuffer.
> AFAIK, you have to do the UTF8 encode/decode yourself (via getUInt8 etc) =
--
> it seems like DataView should have some utilities for extracting/insertin=
g
> strings into the underlying ArrayBuffer.

Thanks, but I think that my case is the opposite:

I've a SIP parser in JavaScript. The parser expects a JS string as
argument. Such string would be the WS text message received.
But in case of WS binary message, I wouls get a Blob or an ArrayBuffer
object (depending on WebSocket#binary_type setting).

So what I need is to covert the received Blob or ArrayBuffer into a
JavaScript String so I can pass it to the parser function. I must
examine how to achieve that, but this is my personal battle :)

Thanks a lot.



--=20
I=C3=B1aki Baz Castillo
<ibc@aliax.net>

From arman@noemax.com  Mon Nov  7 03:26:21 2011
Return-Path: <arman@noemax.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 B8EFC21F8449 for <hybi@ietfa.amsl.com>; Mon,  7 Nov 2011 03:26:21 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.169
X-Spam-Level: 
X-Spam-Status: No, score=-2.169 tagged_above=-999 required=5 tests=[AWL=0.130,  BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
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 65Nx-YhyQhHN for <hybi@ietfa.amsl.com>; Mon,  7 Nov 2011 03:26:21 -0800 (PST)
Received: from mail.noemax.com (mail.noemax.com [64.34.201.8]) by ietfa.amsl.com (Postfix) with ESMTP id 240EC21F8B17 for <hybi@ietf.org>; Mon,  7 Nov 2011 03:26:21 -0800 (PST)
Received: from ArmanLaptop by mail.noemax.com (IceWarp 9.4.1) with ASMTP (SSL) id QWH94510; Mon, 07 Nov 2011 13:26:10 +0200
From: "Arman Djusupov" <arman@noemax.com>
To: "'Tobias Oberstein'" <tobias.oberstein@tavendo.de>, =?utf-8?Q?'I=C3=B1aki_Baz_Castillo'?= <ibc@aliax.net>
References: <002201cc9945$98696960$c93c3c20$@noemax.com>	<4FAE511A-076E-4E5A-8FB7-4E95E774CE28@zaphoyd.com>	<CALiegfkA9YqSe=nYvx4gV6ca5sWXg08KR_9Ubn3QB-Nk8CqFCQ@mail.gmail.com>	<002701cc9962$eb8776b0$c2966410$@noemax.com>	<CALiegfnpX230pAJgZXS4=T2pCX9pwhurSw1L4uaUNrggezn+Gg@mail.gmail.com>	<000801cc99fd$bdcd5d70$39681850$@noemax.com>	<CALiegfkKhEPReZTOxm6wchW3mvnfovcCoSumvWxgBsGLZqiQ6Q@mail.gmail.com>	<001201cc9a2b$780115b0$68034110$@noemax.com>	<634914A010D0B943A035D226786325D42D0C0CDF38@EXVMBX020-12.exch020.serverdata.net>	<000e01cc9ad6$b9ca3f20$2d5ebd60$@noemax.com> <CALiegf=8aAVhJxqFqpwOcw_QB4gQt9N_QxTwC7OJXFAdTGXxzQ@mail.gmail.com> <634914A010D0B943A035D226786325D42D0C0CE016@EXVMBX020-12.exch020.serverdata.net> <001301cc9ae3$157e3c70$407ab550$@noemax.com> <634914A010D0B943A035D226786325D42D0C0CE248@EXVMBX020-12.exch020.serverdata.net>
In-Reply-To: <634914A010D0B943A035D226786325D42D0C0CE248@EXVMBX020-12.exch020.serverdata.net>
Date: Mon, 7 Nov 2011 13:26:09 +0200
Message-ID: <001701cc9d40$10ff5b20$32fe1160$@noemax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-Mailer: Microsoft Outlook 14.0
Thread-Index: AQH2ByfKsUFABchpiUfiw5MkelvqlgHOUuMiArZLHcUBy2YrdQHuryVWAgPL4MQAwc11EAJusB8SAYsaRPICFAeU6wLmaknXAfVp198CEbfiFwIcHREFlH2SSXA=
Content-Language: en-us
Cc: hybi@ietf.org, 'Peter Thorson' <webmaster@zaphoyd.com>
Subject: Re: [hybi] Testsuite update case 7.1.5
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, 07 Nov 2011 11:26:21 -0000

Hello Tobias

> From: Tobias Oberstein [mailto:tobias.oberstein@tavendo.de]
> > connection was closed in the middle of fragmented message.
>=20
> If there is a chance during AUTH48 and support by the WG, then maybe =
add
>=20
> close code 1015 =3D "closed in middle of message"

I would rather give this error code a more generic description such as =
"Aborted/Interrupted", because an endpoint may need to urgently close =
the connection while receiving a long inbound message. This way the =
endpoint can inform the remote side that, for whatever reason, it has to =
terminate all inbound and outbound transfers immediately.

But, in such cases, a much simpler option is to expect the sender to =
drop the connection without a close handshake. This is actually what the =
sender would also want, i.e. to stop sending and release all allocated =
resources immediately. The network error would make it clear to the =
remote side that the connection was aborted. This is what most =
implementations will have to do when requested to close in the middle of =
a transfer.

For example, when the application code requires the connection to be =
closed while WebSocket is in the process of sending a large =
non-fragmented message, there is no other option but to drop the =
connection (unless the sender is prepared to wait until the current =
message is sent to the remote side). Since the situation that we try to =
handle can also happen in the middle of a large fragment or in the =
middle of a single-fragment message, why should a fragmented message be =
treated any differently that a non-fragmented one? Fragmentation is just =
the way that permits us to send a message when its final length is =
unknown.

With best regards,
Arman


From alexey.melnikov@isode.com  Tue Nov 29 06:18:51 2011
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 A99E721F8A7B for <hybi@ietfa.amsl.com>; Tue, 29 Nov 2011 06:18:51 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.599
X-Spam-Level: 
X-Spam-Status: No, score=-102.599 tagged_above=-999 required=5 tests=[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 pm0I4UuIm5OQ for <hybi@ietfa.amsl.com>; Tue, 29 Nov 2011 06:18:51 -0800 (PST)
Received: from rufus.isode.com (rufus.isode.com [62.3.217.251]) by ietfa.amsl.com (Postfix) with ESMTP id B78D221F8AFE for <hybi@ietf.org>; Tue, 29 Nov 2011 06:18:50 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1322576330; d=isode.com; s=selector; i=@isode.com; bh=ypp/8PIqIriEh8U7EX6x3ngfh6u+t6FQZKALRUhxcwI=; 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=GVBrwU4cC/G0TcGnSttgTti1WENcsKEGyNCtjHMN4o4RImZnbYIQas8zjfZzZn8elNwT/F gxPXSxLc1gqfMblAn1E9ZnX0dqPzD7PcvrBNN7D501ivCMnBYyMcYBcsjE4mV6VL3t6nUw f1MBx3mqa4F1WuBLmN9qpNg2iEKk9h0=;
Received: from [172.16.1.29] (shiny.isode.com [62.3.217.250])  by rufus.isode.com (submission channel) via TCP with ESMTPSA  id <TtTpyQBaKzBF@rufus.isode.com>; Tue, 29 Nov 2011 14:18:49 +0000
Message-ID: <4ED4E9CB.3040106@isode.com>
Date: Tue, 29 Nov 2011 14:18:51 +0000
From: Alexey Melnikov <alexey.melnikov@isode.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20111105 Thunderbird/8.0
To: Peter Thorson <webmaster@zaphoyd.com>
References: <02F41063-6221-4EB8-A4E4-2E396A6B946C@zaphoyd.com>
In-Reply-To: <02F41063-6221-4EB8-A4E4-2E396A6B946C@zaphoyd.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] WS close code equivalent to HTTP 500/Internal Server Error
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: Tue, 29 Nov 2011 14:18:51 -0000

Peter Thorson wrote:
> This issue came up while polishing up the error handling code for my WS implementation. There doesn't seem to be a websocket close code equivalent to HTTP 500/Internal server error.
>
> I would like to handle situations where my endpoint catches an internal logic error and knows that continuing the connection will probably result in bad/unknown behavior but knows that it is safe enough to close the connection cleanly.
>
> Example: I am a server and my handler for processing websocket messages is interpreted code and that code has a syntax error. The websocket server itself is fine and can safely close the connection but clearly cannot process messages until someone fixes the missing semicolon somewhere. In an HTTP server I would return 500/Internal Server error to indicate that something on the server end screwed up and that there is probably more information in the server log files to diagnose further.
>
> None of the current close codes (except 1006/abnormal closure - which isn't allowed on the wire) really fit. I'd rather not just drop the connection uncleanly/send back empty close frame since that provides no information about what happened and makes figuring out whose logs I should be looking at as an end application developer difficult. Browsers only report the status code itself and not the reason so sending a normal/going away error code with a more specific reason is less helpful. What are other implementations doing in this case? Would another close code for internal server error make sense?
Let's use 1011 for this (Unless I already suggested it be used for 
something else. Please correct me if I did.):

1011
       1011 indicates that a server is terminating the connection
       because it has encountered an unexpected condition which prevented
       it from fulfilling the request.


From webmaster@zaphoyd.com  Tue Nov 29 06:54:58 2011
Return-Path: <webmaster@zaphoyd.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 1FED221F8BC3 for <hybi@ietfa.amsl.com>; Tue, 29 Nov 2011 06:54:58 -0800 (PST)
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 7a2XCKlwpxKY for <hybi@ietfa.amsl.com>; Tue, 29 Nov 2011 06:54:57 -0800 (PST)
Received: from sh78.surpasshosting.com (sh78.surpasshosting.com [72.29.64.142]) by ietfa.amsl.com (Postfix) with ESMTP id 74ECF21F8BB0 for <hybi@ietf.org>; Tue, 29 Nov 2011 06:54:57 -0800 (PST)
Received: from c-68-51-77-246.hsd1.il.comcast.net ([68.51.77.246]:42372 helo=[10.0.1.82]) by sh78.surpasshosting.com with esmtpa (Exim 4.69) (envelope-from <webmaster@zaphoyd.com>) id 1RVP58-0007xX-Pp; Tue, 29 Nov 2011 09:54:51 -0500
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=iso-8859-1
From: Peter Thorson <webmaster@zaphoyd.com>
In-Reply-To: <4ED4E9CB.3040106@isode.com>
Date: Tue, 29 Nov 2011 08:54:50 -0600
Content-Transfer-Encoding: quoted-printable
Message-Id: <2194D0DD-0E32-48D4-B538-69BB3596B063@zaphoyd.com>
References: <02F41063-6221-4EB8-A4E4-2E396A6B946C@zaphoyd.com> <4ED4E9CB.3040106@isode.com>
To: Alexey Melnikov <alexey.melnikov@isode.com>
X-Mailer: Apple Mail (2.1251.1)
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - sh78.surpasshosting.com
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - zaphoyd.com
X-Source: 
X-Source-Args: 
X-Source-Dir: 
Cc: hybi@ietf.org
Subject: Re: [hybi] WS close code equivalent to HTTP 500/Internal Server Error
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: Tue, 29 Nov 2011 14:54:58 -0000

A quick search through the hybi list logs indicates code 1011 has only =
been mentioned in relation to this error condition.

On Nov 29, 2011, at 8:18 , Alexey Melnikov wrote:

> Peter Thorson wrote:
>> This issue came up while polishing up the error handling code for my =
WS implementation. There doesn't seem to be a websocket close code =
equivalent to HTTP 500/Internal server error.
>>=20
>> I would like to handle situations where my endpoint catches an =
internal logic error and knows that continuing the connection will =
probably result in bad/unknown behavior but knows that it is safe enough =
to close the connection cleanly.
>>=20
>> Example: I am a server and my handler for processing websocket =
messages is interpreted code and that code has a syntax error. The =
websocket server itself is fine and can safely close the connection but =
clearly cannot process messages until someone fixes the missing =
semicolon somewhere. In an HTTP server I would return 500/Internal =
Server error to indicate that something on the server end screwed up and =
that there is probably more information in the server log files to =
diagnose further.
>>=20
>> None of the current close codes (except 1006/abnormal closure - which =
isn't allowed on the wire) really fit. I'd rather not just drop the =
connection uncleanly/send back empty close frame since that provides no =
information about what happened and makes figuring out whose logs I =
should be looking at as an end application developer difficult. Browsers =
only report the status code itself and not the reason so sending a =
normal/going away error code with a more specific reason is less =
helpful. What are other implementations doing in this case? Would =
another close code for internal server error make sense?
> Let's use 1011 for this (Unless I already suggested it be used for =
something else. Please correct me if I did.):
>=20
> 1011
>      1011 indicates that a server is terminating the connection
>      because it has encountered an unexpected condition which =
prevented
>      it from fulfilling the request.
>=20


From gregw@intalio.com  Tue Nov 29 14:45:49 2011
Return-Path: <gregw@intalio.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 AF1AA21F8B27 for <hybi@ietfa.amsl.com>; Tue, 29 Nov 2011 14:45:49 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.977
X-Spam-Level: 
X-Spam-Status: No, score=-2.977 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_LOW=-1]
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 ZJIh0zi+OiVY for <hybi@ietfa.amsl.com>; Tue, 29 Nov 2011 14:45:49 -0800 (PST)
Received: from mail-vx0-f172.google.com (mail-vx0-f172.google.com [209.85.220.172]) by ietfa.amsl.com (Postfix) with ESMTP id 2D98321F8B0E for <hybi@ietf.org>; Tue, 29 Nov 2011 14:45:49 -0800 (PST)
Received: by vcbfy13 with SMTP id fy13so7057795vcb.31 for <hybi@ietf.org>; Tue, 29 Nov 2011 14:45:48 -0800 (PST)
MIME-Version: 1.0
Received: by 10.220.225.137 with SMTP id is9mr3034930vcb.259.1322606748517; Tue, 29 Nov 2011 14:45:48 -0800 (PST)
Received: by 10.52.101.193 with HTTP; Tue, 29 Nov 2011 14:45:48 -0800 (PST)
In-Reply-To: <4ED4E9CB.3040106@isode.com>
References: <02F41063-6221-4EB8-A4E4-2E396A6B946C@zaphoyd.com> <4ED4E9CB.3040106@isode.com>
Date: Wed, 30 Nov 2011 09:45:48 +1100
Message-ID: <CAH_y2NHsOK5Bvf8NO0qd9oSgzN67dEtOtcVKdOROoTLZN0b14w@mail.gmail.com>
From: Greg Wilkins <gregw@intalio.com>
To: Alexey Melnikov <alexey.melnikov@isode.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org, Peter Thorson <webmaster@zaphoyd.com>
Subject: Re: [hybi] WS close code equivalent to HTTP 500/Internal Server Error
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: Tue, 29 Nov 2011 22:45:49 -0000

On 30 November 2011 01:18, Alexey Melnikov <alexey.melnikov@isode.com> wrot=
e:
> 1011
> =A0 =A0 =A01011 indicates that a server is terminating the connection
> =A0 =A0 =A0because it has encountered an unexpected condition which preve=
nted
> =A0 =A0 =A0it from fulfilling the request.

+1

what is the process path from here?    Do we have any other changes needed?

From stpeter@stpeter.im  Tue Nov 29 15:32:01 2011
Return-Path: <stpeter@stpeter.im>
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 CBEC021F8AE6 for <hybi@ietfa.amsl.com>; Tue, 29 Nov 2011 15:32:01 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.599
X-Spam-Level: 
X-Spam-Status: No, score=-102.599 tagged_above=-999 required=5 tests=[AWL=0.000, 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 whRxSzGjFmZg for <hybi@ietfa.amsl.com>; Tue, 29 Nov 2011 15:32:00 -0800 (PST)
Received: from stpeter.im (mailhost.stpeter.im [207.210.219.225]) by ietfa.amsl.com (Postfix) with ESMTP id DE56821F8ACA for <hybi@ietf.org>; Tue, 29 Nov 2011 15:32:00 -0800 (PST)
Received: from normz.cisco.com (unknown [72.163.0.129]) (Authenticated sender: stpeter) by stpeter.im (Postfix) with ESMTPSA id 3E0B5422B6; Tue, 29 Nov 2011 16:38:55 -0700 (MST)
Message-ID: <4ED56B6F.7000504@stpeter.im>
Date: Tue, 29 Nov 2011 16:31:59 -0700
From: Peter Saint-Andre <stpeter@stpeter.im>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: Greg Wilkins <gregw@intalio.com>
References: <02F41063-6221-4EB8-A4E4-2E396A6B946C@zaphoyd.com> <4ED4E9CB.3040106@isode.com> <CAH_y2NHsOK5Bvf8NO0qd9oSgzN67dEtOtcVKdOROoTLZN0b14w@mail.gmail.com>
In-Reply-To: <CAH_y2NHsOK5Bvf8NO0qd9oSgzN67dEtOtcVKdOROoTLZN0b14w@mail.gmail.com>
X-Enigmail-Version: 1.3.3
OpenPGP: url=https://stpeter.im/stpeter.asc
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Cc: hybi@ietf.org, Peter Thorson <webmaster@zaphoyd.com>
Subject: Re: [hybi] WS close code equivalent to HTTP 500/Internal Server Error
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: Tue, 29 Nov 2011 23:32:01 -0000

On 11/29/11 3:45 PM, Greg Wilkins wrote:
> On 30 November 2011 01:18, Alexey Melnikov <alexey.melnikov@isode.com> wrote:
>> 1011
>>      1011 indicates that a server is terminating the connection
>>      because it has encountered an unexpected condition which prevented
>>      it from fulfilling the request.
> 
> +1
> 
> what is the process path from here? 

This code (and a few others) will be slipped into the spec during "AUTH48":

http://www.rfc-editor.org/pubprocess.html#auth48

>   Do we have any other changes needed?

Some slight editorial issues, registration process clarifications, and
the close codes that have been discussed on the list. Alexey and Ian can
provide more details.

Peter

-- 
Peter Saint-Andre
https://stpeter.im/



From salvatore.loreto@ericsson.com  Tue Nov 29 22:41:19 2011
Return-Path: <salvatore.loreto@ericsson.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 24B7821F854E for <hybi@ietfa.amsl.com>; Tue, 29 Nov 2011 22:41:19 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -106.599
X-Spam-Level: 
X-Spam-Status: No, score=-106.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4, 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 QqaU1Wvo+weD for <hybi@ietfa.amsl.com>; Tue, 29 Nov 2011 22:41:16 -0800 (PST)
Received: from mailgw10.se.ericsson.net (mailgw10.se.ericsson.net [193.180.251.61]) by ietfa.amsl.com (Postfix) with ESMTP id B331B21F8492 for <hybi@ietf.org>; Tue, 29 Nov 2011 22:41:15 -0800 (PST)
X-AuditID: c1b4fb3d-b7b5fae00000219a-66-4ed5d00a2585
Received: from esessmw0237.eemea.ericsson.se (Unknown_Domain [153.88.253.125]) by mailgw10.se.ericsson.net (Symantec Mail Security) with SMTP id E9.99.08602.A00D5DE4; Wed, 30 Nov 2011 07:41:14 +0100 (CET)
Received: from mail.lmf.ericsson.se (153.88.115.8) by esessmw0237.eemea.ericsson.se (153.88.115.91) with Microsoft SMTP Server id 8.3.137.0; Wed, 30 Nov 2011 07:41:14 +0100
Received: from nomadiclab.lmf.ericsson.se (nomadiclab.lmf.ericsson.se [131.160.33.3])	by mail.lmf.ericsson.se (Postfix) with ESMTP id 00DF7231B	for <hybi@ietf.org>; Wed, 30 Nov 2011 08:41:14 +0200 (EET)
Received: from nomadiclab.lmf.ericsson.se (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id B8E9251B2E	for <hybi@ietf.org>; Wed, 30 Nov 2011 08:41:13 +0200 (EET)
Received: from Salvatore-Loretos-MacBook-Pro.local (localhost [127.0.0.1])	by nomadiclab.lmf.ericsson.se (Postfix) with ESMTP id 4865E515DF	for <hybi@ietf.org>; Wed, 30 Nov 2011 08:41:13 +0200 (EET)
Message-ID: <4ED5D00D.1020600@ericsson.com>
Date: Wed, 30 Nov 2011 07:41:17 +0100
From: Salvatore Loreto <salvatore.loreto@ericsson.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:8.0) Gecko/20111105 Thunderbird/8.0
MIME-Version: 1.0
To: hybi@ietf.org
References: <02F41063-6221-4EB8-A4E4-2E396A6B946C@zaphoyd.com> <4ED4E9CB.3040106@isode.com>
In-Reply-To: <4ED4E9CB.3040106@isode.com>
Content-Type: text/plain; charset="ISO-8859-1"; format=flowed
Content-Transfer-Encoding: 7bit
X-Virus-Scanned: ClamAV using ClamSMTP
X-Brightmail-Tracker: AAAAAA==
Subject: Re: [hybi] WS close code equivalent to HTTP 500/Internal Server Error
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, 30 Nov 2011 06:41:19 -0000

wfm

/Sal

On 11/29/11 3:18 PM, Alexey Melnikov wrote:
> Peter Thorson wrote:
>> This issue came up while polishing up the error handling code for my WS implementation. There doesn't seem to be a websocket close code equivalent to HTTP 500/Internal server error.
>>
>> I would like to handle situations where my endpoint catches an internal logic error and knows that continuing the connection will probably result in bad/unknown behavior but knows that it is safe enough to close the connection cleanly.
>>
>> Example: I am a server and my handler for processing websocket messages is interpreted code and that code has a syntax error. The websocket server itself is fine and can safely close the connection but clearly cannot process messages until someone fixes the missing semicolon somewhere. In an HTTP server I would return 500/Internal Server error to indicate that something on the server end screwed up and that there is probably more information in the server log files to diagnose further.
>>
>> None of the current close codes (except 1006/abnormal closure - which isn't allowed on the wire) really fit. I'd rather not just drop the connection uncleanly/send back empty close frame since that provides no information about what happened and makes figuring out whose logs I should be looking at as an end application developer difficult. Browsers only report the status code itself and not the reason so sending a normal/going away error code with a more specific reason is less helpful. What are other implementations doing in this case? Would another close code for internal server error make sense?
> Let's use 1011 for this (Unless I already suggested it be used for
> something else. Please correct me if I did.):
>
> 1011
>         1011 indicates that a server is terminating the connection
>         because it has encountered an unexpected condition which prevented
>         it from fulfilling the request.
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>

