Re: [hybi] extension params (was draft-10 questions)
Julian Reschke <julian.reschke@gmx.de> Mon, 01 August 2011 08:27 UTC
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 4D98221F86BB for <hybi@ietfa.amsl.com>; Mon, 1 Aug 2011 01:27:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.271
X-Spam-Level:
X-Spam-Status: No, score=-104.271 tagged_above=-999 required=5 tests=[AWL=-1.672, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H-Xq82fYb9wM for <hybi@ietfa.amsl.com>; Mon, 1 Aug 2011 01:27:22 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by ietfa.amsl.com (Postfix) with SMTP id 567E421F86AF for <hybi@ietf.org>; Mon, 1 Aug 2011 01:27:22 -0700 (PDT)
Received: (qmail invoked by alias); 01 Aug 2011 08:27:25 -0000
Received: from p508FDB9A.dip.t-dialin.net (EHLO [192.168.178.36]) [80.143.219.154] by mail.gmx.net (mp040) with SMTP; 01 Aug 2011 10:27:25 +0200
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1+10BMs8H+18FwYYPCWM/HklJvQi88UrSjCBkqfxv enCEVFv3nbrpJC
Message-ID: <4E366369.6050706@gmx.de>
Date: Mon, 01 Aug 2011 10:27:21 +0200
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version: 1.0
To: Brodie Thiesfield <brodie@jellycan.com>
References: <CAMY5452DoLdw_znttJ_quntoGwK8RdTMF3QoE_kU8k81DveLiw@mail.gmail.com>
In-Reply-To: <CAMY5452DoLdw_znttJ_quntoGwK8RdTMF3QoE_kU8k81DveLiw@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: hybi@ietf.org
Subject: Re: [hybi] extension params (was draft-10 questions)
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, 01 Aug 2011 08:27:23 -0000
On 2011-08-01 02:23, Brodie Thiesfield wrote: > All, > > During the recent IETF meeting the format of the websocket extension > header parameters was brought up. The issue being should the header > follow the rules of HTTP (allowing quoted strings) or the simplified > rules of websocket draft (allowing only tokens). Yes. In value parameters. That's not a strict HTTP rule, but doing so would help reusing existing parsers. > ... > Since a websocket connection is plain HTTP prior to upgrade, then a > server supporting normal HTTP requests on a connection (i.e. not a WS > specific server) will already be using its full HTTP parser. > > It is not possible to determine what is a WS upgrade message until the > headers have already been parsed, e.g. the following message is a > valid upgrade but that is not known until the last byte is parsed. > Additionally, take away the "Upgrade" header from the end and it is a > plain HTTP GET with some unnecessary headers. > > GET /chat HTTP/1.1 > Host: server.example.com > Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ== > Sec-WebSocket-Origin: http://example.com > Sec-WebSocket-Protocol: chat, superchat > Sec-WebSocket-Version: 8 > Connection: Upgrade > Upgrade: websocket > > The WS headers have already been parsed by the HTTP parser. Unless the > special parsing of the Sec-Websocket-Extension depends solely on the > header key, there can be no special parsing. If it does depend on the > header key, then won't this require a change to the HTTP spec to > introduce the rule that this header key is parsed specially? If it was > so defined, then every header key of every HTTP message will need to > be examined to see if it requires the simplified parsing. > ... It does not depend on the header name; if it did it wouldn't be implementable at all. The concern is just that if we do not allow Sec-WebSocket-Extensions: bar; baz="2" in addition to Sec-WebSocket-Extensions: bar; baz=2 then there's a risk of some implementations re-using parser code, accepting the latter form, and some not doing so, creating interop problems. SO far I haven't heard back from Ian (who apparently talked to the other Ian), but I think it was mentioned in the session that this does affect the API. It does not. Best regards, Julian
- [hybi] extension params (was draft-10 questions) Brodie Thiesfield
- Re: [hybi] extension params (was draft-10 questio… Greg Wilkins
- Re: [hybi] extension params (was draft-10 questio… Brodie Thiesfield
- Re: [hybi] extension params (was draft-10 questio… Julian Reschke
- Re: [hybi] extension params (was draft-10 questio… Julian Reschke
- Re: [hybi] extension params (was draft-10 questio… Takeshi Yoshino