Re: [hybi] Ticket#1 Http Compliance

Maciej Stachowiak <mjs@apple.com> Thu, 13 May 2010 09:15 UTC

Return-Path: <mjs@apple.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 24D6A3A6C01 for <hybi@core3.amsl.com>; Thu, 13 May 2010 02:15:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.091
X-Spam-Level:
X-Spam-Status: No, score=-105.091 tagged_above=-999 required=5 tests=[AWL=-0.352, BAYES_20=-0.74, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VfKRtqlYnv4h for <hybi@core3.amsl.com>; Thu, 13 May 2010 02:15:20 -0700 (PDT)
Received: from mail-out4.apple.com (mail-out4.apple.com [17.254.13.23]) by core3.amsl.com (Postfix) with ESMTP id 157BA3A6AE9 for <hybi@ietf.org>; Thu, 13 May 2010 02:13:31 -0700 (PDT)
Received: from relay11.apple.com (relay11.apple.com [17.128.113.48]) by mail-out4.apple.com (Postfix) with ESMTP id 87AB89981918 for <hybi@ietf.org>; Thu, 13 May 2010 02:13:21 -0700 (PDT)
X-AuditID: 11807130-b7c56ae000001d33-7f-4bebc2b1b0af
Received: from gertie.apple.com (gertie.apple.com [17.151.62.15]) by relay11.apple.com (Apple SCV relay) with SMTP id 27.B4.07475.1B2CBEB4; Thu, 13 May 2010 02:13:21 -0700 (PDT)
MIME-version: 1.0
Content-transfer-encoding: 7bit
Content-type: text/plain; charset="us-ascii"
Received: from [17.151.84.28] by gertie.apple.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26 2008; 32bit)) with ESMTPSA id <0L2C000WPPM8NG40@gertie.apple.com> for hybi@ietf.org; Thu, 13 May 2010 02:13:20 -0700 (PDT)
From: Maciej Stachowiak <mjs@apple.com>
In-reply-to: <4BEBBD7D.8090609@webtide.com>
Date: Thu, 13 May 2010 02:13:20 -0700
Message-id: <16DD953D-55E8-4188-B979-0AA348878C73@apple.com>
References: <4BEAB021.5030600@webtide.com> <16A430F2-1458-404C-839B-7EEF23434026@apple.com> <4BEBBD7D.8090609@webtide.com>
To: Greg Wilkins <gregw@webtide.com>
X-Mailer: Apple Mail (2.1078)
X-Brightmail-Tracker: AAAAAQAAAZE=
Cc: "hybi@ietf.org" <hybi@ietf.org>
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 09:15:24 -0000

On May 13, 2010, at 1:51 AM, Greg Wilkins wrote:

> 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.

How is the implication of "compatible" different from what you describe for "compliant"? Can you give an example of something that would be HTTP compatible, but not HTTP compliant?


> 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).

Having two different handshakes would not be a good idea. Also, the client initiates the handshake and can't tell if the port is being shared with an HTTP server, so there's no opportunity to initiate the handshake differently. Making the server reply differently depending on whether it is standalone, when the client handshake has to be the same, would just create interop problems.

> 
>>>  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.
> 

Listing parts of the HTTP RFC that would have no effect on the protocol design seems unhelpful, especially since the framing material implies they *are* relevant to requirements on the protocol. It seems like none of the three cited requirements would have any particular effect on the design of the WebSocket protocol, from your explanations above.

Regards,
Maciej