[whatwg] web-apps - TCPConnection
S. Mike Dierken
mike at dierken.com
Sun Oct 16 20:44:22 PDT 2005
I just noticed this section of the web-apps 1.0 specification regarding TCP
My only question is - why?
It seems bizarre to introduce this section into a Web browsing environment
where HTTP is available to define most of the interactions described in this
I realize this is just a draft, but there are some odd descriptions - for
example, the TCPConnection must use port 80 (the port that defines HTTP),
but later the communication requirements define a completely different and
new protocol on that port:
"If the target host is not a valid host name, or if the port argument is not
either equal to 80, 443, or greater than 1024 and less then 65537, then the
UA must raise a security exception."
"Once a TCP/IP connection to the remote host is established, the user agent
must transmit the following sequence of bytes, represented here in
hexadecimal form: 0x48 0x65 0x6C 0x6C 0x6F 0x0A
This represents the string "Hello" followed by a newline, encoded in UTF-8.
This whole section seems somewhat unnecessary. If you are trying to securely
establish a connection & then switch to a private/proprieatry protocol, you
can use the Upgrade header to transition beyond HTTP once the connection is
"The Upgrade header field is intended to provide a simple mechanism for
transition from HTTP/1.1 to some other, incompatible protocol. It does so by
allowing the client to advertise its desire to use another protocol, such as
a later version of HTTP with a higher major version number, even though the
current request has been made using HTTP/1.1. This eases the difficult
transition between incompatible protocols by allowing the client to initiate
a request in the more commonly supported protocol while indicating to the
server that it would like to use a "better" protocol if available (where
"better" is determined by the server, possibly according to the nature of
the method and/or resource being requested)."
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the whatwg