Re: [hybi] Ticket#1 Http Compliance
Greg Wilkins <gregw@webtide.com> Thu, 13 May 2010 08:51 UTC
Return-Path: <gregw@webtide.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 046D73A6962 for <hybi@core3.amsl.com>; Thu, 13 May 2010 01:51:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.339
X-Spam-Level:
X-Spam-Status: No, score=-0.339 tagged_above=-999 required=5 tests=[AWL=-0.340, BAYES_50=0.001]
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 87fKvIqFTYrw for <hybi@core3.amsl.com>; Thu, 13 May 2010 01:51:50 -0700 (PDT)
Received: from mail-ww0-f44.google.com (mail-ww0-f44.google.com [74.125.82.44]) by core3.amsl.com (Postfix) with ESMTP id A02333A6944 for <hybi@ietf.org>; Thu, 13 May 2010 01:51:29 -0700 (PDT)
Received: by wwb28 with SMTP id 28so773495wwb.31 for <hybi@ietf.org>; Thu, 13 May 2010 01:51:14 -0700 (PDT)
Received: by 10.227.132.139 with SMTP id b11mr7896380wbt.169.1273740673942; Thu, 13 May 2010 01:51:13 -0700 (PDT)
Received: from [192.168.0.100] (host116-234-static.43-88-b.business.telecomitalia.it [88.43.234.116]) by mx.google.com with ESMTPS id y22sm7439992wby.23.2010.05.13.01.51.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 13 May 2010 01:51:13 -0700 (PDT)
Message-ID: <4BEBBD7D.8090609@webtide.com>
Date: Thu, 13 May 2010 10:51:09 +0200
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.24 (X11/20100411)
MIME-Version: 1.0
To: "hybi@ietf.org" <hybi@ietf.org>
References: <4BEAB021.5030600@webtide.com> <16A430F2-1458-404C-839B-7EEF23434026@apple.com>
In-Reply-To: <16A430F2-1458-404C-839B-7EEF23434026@apple.com>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Subject: Re: [hybi] Ticket#1 Http Compliance
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 13 May 2010 08:51:51 -0000
Maciej Stachowiak wrote: > What is the difference between "HTTP/1.1 compatible" and "HTTP/1.1 > compliant"? I can't tell if I support this change without understanding > what difference is intended The intent of changing to compliant is to strengthen this requirement. Compliant implies that no part of the HTTP specification will be violated. However, I remind you that this requirement is only in the explicit circumstances of when websocket is running on a port shared with HTTP. When not sharing a HTTP port, a websocket protocol is free to have it's own handshake (that may be HTTP-like or a non compliant variation of HTTP). >> Reason: when operating on the standard HTTP ports, existing web >> infrastructure may handle connections and requests according to >> existing standards prior to the establishment of the new protocol. >> It may also be desirable for consenting clients and servers to use >> HTTP features such as authentication and redirection, prior to >> establishing the websocket handshake. >> >> However, this requirement does not mean that a websocket >> implementation that is not for general-purpose HTTP, need implement >> any more of the HTTP protocol than is required to establish a >> websocket connection. The minimal requirements of HTTP are small, as >> indicated by the following extracts of RFC-2616: > > I think quoting parts of the HTTP RFC in the requirements document is > not a good idea. It seems like too much detail for a requirements document. The intent is to try to communicate that requiring HTTP compliances is not going to require additional features on minimal implementations. There are very few MUST's in RFC2616. The intent of this requirement is more of a you must not break HTTP (when sharing a port) rather than a you must not implement all of HTTP. >> RFC-2616 5.1.1 The methods GET and HEAD MUST be supported by all >> general-purpose servers. All other methods are OPTIONAL > > If this implies that all WebSocket servers, even WebSocket servers that > are standalone and not combined with HTTP servers, must implement GET > and HEAD, then that seems like a silly and pointless requirement. What > would be the practical benefit of this? This says the exact opposite. A standalone websocket server is not a general purpose HTTP server, so this requirement does not apply. Thus there are no methods that must be implemented. >> RFC-2616 6.1.1 HTTP applications are not required to understand the >> meaning of all registered status codes, though such understanding >> is obviously desirable. However, applications MUST understand the >> class of any status code, as indicated by the first digit, and >> treat any unrecognized response as being equivalent to the x00 >> status code of that class > > What if anything does this imply for WebSocket clients and servers? Nothing - and that is the point. It is indicating that HTTP compliance does not require a websocket implementation (even one operating on a shared port) to implement any specific status codes. >> RFC-2616 7.1 Unrecognized header fields SHOULD be ignored by the >> recipient and MUST be forwarded by transparent proxies. > > It's not clear how this requirement constrains the design of the > protocol. For example, if WebSocket made the handshake fail if any > header fields are present other than a short whitelist, that would be > fully consistent with this conformance requirement. It's not intended to constrain the design of the protocol. IT is indicating that HTTP compliance does not require a websocket implementation (even one operating on a shared port) to implement any specific headers. >> My intent with this wording is to not require any more of HTTP >> to be implemented my minimal implementations, hence the extracts >> from RFC2616 showing that there are few MUSTs in HTTP. > > Are you claiming these are the only MUST-level requirements that apply > to HTTP clients and servers? That seems wrong to me. If you are indeed > claiming this I'll be glad to provide counter-examples. I'm claiming that a requirement of HTTP compliance will not require any more of the HTTP specification to be implemented than already is. The intent of this requirement is not to force any more implementation of the HTTP specification. It is to prevent the protocol breaking the HTTP specification when sharing a port with a general purpose HTTP server. >> This will allow arbitrary HTTP features to be used if >> client and server desire to do so - which seams reasonable >> as in many cases the client and server are going to have >> full HTTP implementations available. > > If that is indeed desirable, it seems like a separate requirement from > being "HTTP compliant". The handshake could be "HTTP compliant" without > enabling this. This is an argument for HTTP compliance as it prevents an implementation from disabling arbitrary HTTP features (when sharing a port with HTTP). I think it is perfectly OK for the websocket protocol to specifically disable a feature that is incompatible with the handshake (eg if redirections are shown to be a security risk). >> However, it does allow the protocol to specifically prohibit >> the use of features, if for example we decided that redirect >> was a undesirable for some reason. > > I agree that we must have the freedom for the protocol to do this. But > for this very reason, the change doesn't do what you said in the > previous paragraph. It is entirely possible to limit HTTP features and still be compliant with the HTTP RFC. There is a big difference between the protocol choosing not to support a HTTP feature: eg "a websocket client shall not follow a redirect sent in response to an upgrade request" and with the protocol being specified in such a way that HTTP is actually broken: eg. "a websocket client shall send non HTTP compliant data on the connection prior to the upgrade completing". regards
- [hybi] Ticket#1 Http Compliance Greg Wilkins
- Re: [hybi] Ticket#1 Http Compliance Roberto Peon
- Re: [hybi] Ticket#1 Http Compliance Anne van Kesteren
- Re: [hybi] Ticket#1 Http Compliance Maciej Stachowiak
- Re: [hybi] Ticket#1 Http Compliance Greg Wilkins
- Re: [hybi] Ticket#1 Http Compliance Greg Wilkins
- Re: [hybi] Ticket#1 Http Compliance Salvatore Loreto
- Re: [hybi] Ticket#1 Http Compliance Greg Wilkins
- Re: [hybi] Ticket#1 Http Compliance Maciej Stachowiak
- Re: [hybi] Ticket#1 Http Compliance Maciej Stachowiak
- Re: [hybi] Ticket#1 Http Compliance Greg Wilkins
- Re: [hybi] Ticket#1 Http Compliance Anne van Kesteren
- Re: [hybi] Ticket#1 Http Compliance Maciej Stachowiak
- Re: [hybi] Ticket#1 Http Compliance Greg Wilkins
- Re: [hybi] Ticket#1 Http Compliance Greg Wilkins
- Re: [hybi] Ticket#1 Http Compliance Anne van Kesteren
- Re: [hybi] Ticket#1 Http Compliance Greg Wilkins
- [hybi] requirements document is a milestone (was … Salvatore Loreto
- Re: [hybi] Ticket#1 Http Compliance Scott Ferguson
- Re: [hybi] Ticket#1 Http Compliance Thomson, Martin
- Re: [hybi] Ticket#1 Http Compliance Greg Wilkins
- Re: [hybi] Ticket#1 Http Compliance Greg Wilkins