[whatwg] Web Socket Default Ports Confusing?
yuzo at google.com
Wed Aug 19 18:40:07 PDT 2009
as per http://tools.ietf.org/html/draft-hixie-thewebsocketprotocol-35 ,
in web socket handshake, a client omits the port number if it is 80/443
a server omits it if it is 81/815.
Isn't this confusing?
I guess the client side behavior mimics HTTP and hence hard
to be changed. How about changing the server side behavior such that
port number is always explicitly stated regardless of the value?
(Behavior is still inconsistent but less confusing, IMHO.)
4. Client-side requirements
6. Send the following bytes:
48 6f 73 74 3a 20
Send the /host/ value, converted to ASCII lowercase, and encoded
If /secure/ is false, and /port/ is not 80, or if /secure/ is
true, and /port/ is not 443, then send an 0x3a byte (":")
followed by the value of /port/, expressed as a base-ten
integer, encoded as US-ASCII.
5. Server-side requirements
5.1. Minimal handshake
NOTE: Do not include the port if it is the default port for Web
Socket protocol connections of the type in question (81 for
unencrypted connections and 815 for encrypted connections).
More information about the whatwg