Re: [hybi] Web sockets and existing HTTP stacks

Justin Erenkrantz <justin@erenkrantz.com> Mon, 01 February 2010 04:23 UTC

Return-Path: <justin.erenkrantz@gmail.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id AEACD3A6859 for <hybi@core3.amsl.com>; Sun, 31 Jan 2010 20:23:41 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.99
X-Spam-Level:
X-Spam-Status: No, score=-1.99 tagged_above=-999 required=5 tests=[AWL=-0.013, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5DEdBsxJJF04 for <hybi@core3.amsl.com>; Sun, 31 Jan 2010 20:23:41 -0800 (PST)
Received: from mail-pz0-f198.google.com (mail-pz0-f198.google.com [209.85.222.198]) by core3.amsl.com (Postfix) with ESMTP id 06D703A6840 for <hybi@ietf.org>; Sun, 31 Jan 2010 20:23:41 -0800 (PST)
Received: by pzk36 with SMTP id 36so4714952pzk.5 for <hybi@ietf.org>; Sun, 31 Jan 2010 20:24:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=tUPg0iiOWh0a19gr2GdsS305LW0BCM7zpJoE+Mo0XLo=; b=FkITE1D9e3oZi1G9BwS7tzp24fZKN62+LrjM4fbiqr4BZ5Ry+YsnJCpyFacyOC5BYK 4oGIah5agnmVRJcv239d6BumlfV4Wk5XvhyKilx+O8CXK709MguFkOBVNKpUbRXSXef7 ychGYSFm2PL2R4a4jJZf2gaJiZmJqVcZkqBuQ=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=oCcO+cxyEbojDm3r9uF9gmtkQHVsCnFUvF6RsCIvhVlZGGuuAg3PXR6EPS13wU50zP 20B+AZzP1KPA3idB5IkgnYMsSVVFqF/ie3/o8pmEyN/pgQOxbipD/Q3oPegMWADAN1ao 7BybwJh2GgTd2qdVMdHx/7MwmR/uDxYVMiCr0=
MIME-Version: 1.0
Sender: justin.erenkrantz@gmail.com
Received: by 10.142.195.18 with SMTP id s18mr2709870wff.325.1264998251373; Sun, 31 Jan 2010 20:24:11 -0800 (PST)
In-Reply-To: <A3071537-C3A5-4C0D-945F-618382435383@apple.com>
References: <557ae280911171402v7546e5e7n93a1e57f87dc10e5@mail.gmail.com> <Pine.LNX.4.62.0912032347360.15540@hixie.dreamhostps.com> <4B2C1D52.9020505@webtide.com> <5c902b9e0912181640n497169cdrfa71f9a2908e6ef3@mail.gmail.com> <20091219005442.GA10949@shareable.org> <4B2C287E.1030006@webtide.com> <Pine.LNX.4.64.1001310835410.3846@ps20323.dreamhostps.com> <5821ea241001311219j111d25a3h27fb2d05a2ece32d@mail.gmail.com> <5821ea241001311226s3d2092d7kef13f958db3a0132@mail.gmail.com> <A3071537-C3A5-4C0D-945F-618382435383@apple.com>
Date: Sun, 31 Jan 2010 20:24:11 -0800
X-Google-Sender-Auth: 8562aed324c8ba73
Message-ID: <5c902b9e1001312024k7ba2df94iceeb0828051fddaf@mail.gmail.com>
From: Justin Erenkrantz <justin@erenkrantz.com>
To: Maciej Stachowiak <mjs@apple.com>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] Web sockets and existing HTTP stacks
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 01 Feb 2010 04:23:41 -0000

On Sun, Jan 31, 2010 at 7:19 PM, Maciej Stachowiak <mjs@apple.com> wrote:
> What are the RFC2616 requirements on HTTP upgrade?

If the server accepts the Upgrade request, it will send back a 101 in
an HTTP/1.1-formatted response and then *after* the blank line
terminating the response, the new protocol is in effect.  So, in
essence, you have one HTTP/1.1 request and one HTTP/1.1 response, a
blank line (CRLF), and then all bets are off.  (See 10.1.2 of RFC
2616.)

> Does it limit the set of criteria that an upgrade protocol may use to reject an upgrade request or response? I didn't see such a requirement. So I think WebSocket does satisfy the contract for port 80, though admittedly in a way that may be inconvenient for some deployed software.

No, because the drafts mandate "specific opaque bytes" rather than
anything that looks like an HTTP/1.1 request.  -- justin