HTML Standard Tracker

Diff (omit for latest revision)
Filter

Short URL: http://html5.org/r/3725

File a bug

SVNBugCommentTime (UTC)
3725Update WebSocket to use ports 80 and 443 instead of 81 and 815, on advice from IANA.2009-09-02 00:18
Index: source
===================================================================
--- source	(revision 3724)
+++ source	(revision 3725)
@@ -71436,9 +71436,10 @@
   only relationship to HTTP is that its handshake is interpreted by
   HTTP servers as an Upgrade request.</p>
 
-  <p>The Web Socket protocol by default uses port 81 for regular
-  Web Socket connections and port 815 for Web Socket connections
-  tunneled over TLS.</p>
+  <p>Based on the expert recommendation of the IANA<!-- [IANA #257455]
+  -->, the Web Socket protocol by default uses port 80 for regular Web
+  Socket connections and port 443 for Web Socket connections tunneled
+  over TLS.</p>
 
 
   <h6>Establishing a connection</h6>
@@ -71447,24 +71448,14 @@
 
   <p>There are several options for establishing a Web Socket connection.</p>
 
-  <p>The simplest method is to use port 81 to get a direct connection
-  to a Web Socket server. However, this port may be blocked by
-  firewalls.</p>
-
-  <p>The second simplest method is to use TLS encryption and port 815
-  to connect directly to a Web Socket server. This is the preferred
-  solution, as it is secure and correct. However, TLS encryption can
-  be computationally expensive, and port 815 might also be blocked by
-  firewalls.</p>
-
-  <p>To avoid firewalls, ports 80 and 443 might be used instead. These
-  are the HTTP and HTTPS ports. Port 80 traffic, however, will often
-  be intercepted by HTTP proxies, which can lead to the connection
+  <p>The simplest method is to use port 80 to get a direct connection
+  to a Web Socket server. Port 80 traffic, however, will often be
+  intercepted by HTTP proxies, which can lead to the connection
   failing to be established.</p>
 
-  <p>Port 443, using encryption, is therefore the most reliable
-  solution. It is unlikely to be blocked by a firewall or intercepted
-  by a proxy. However, again, TLS encryption can be computationally
+  <p>The second simplest method is to use TLS encryption and port 443
+  to connect directly to a Web Socket server. This has the advantage
+  of being more secure; however, TLS encryption can be computationally
   expensive.</p>
 
   <p>When a connection is to be made to a port that is shared by an
@@ -71491,7 +71482,7 @@
   <pre>GET /demo HTTP/1.1
 Upgrade: WebSocket
 Connection: Upgrade
-Host: example.com:81
+Host: example.com
 Origin: http://example.com
 WebSocket-Protocol: sample</pre>
 
@@ -71587,7 +71578,7 @@
 
    <li><p>If there is no explicit <var title="">port</var>, then: if
    <var title="">secure</var> is false, let <var title="">port</var>
-   be 81, otherwise let <var title="">port</var> be 815.</p></li>
+   be 80, otherwise let <var title="">port</var> be 443.</p></li>
 
    <li><p>Let <var title="">resource name</var> be the value of the
    <span title="url-path">&lt;path&gt;</span> component (which might
@@ -71629,8 +71620,8 @@
    title="">url</var>.</li>
 
    <li>If the <var title="">secure</var> flag is false and port is
-   not 81, or if the <var title="">secure</var> flag is true and
-   port is not 815, then append the string "<code title="">:</code>"
+   not 80, or if the <var title="">secure</var> flag is true and
+   port is not 443, then append the string "<code title="">:</code>"
    followed by <var title="">port</var> to <var
    title="">url</var>.</li>
 
@@ -71861,15 +71852,11 @@
      <p>For example, if the server had a username and password that
      applied to <code title="">http://example.com/socket</code>, and
      the Web Socket was being opened to <code
-     title="">ws://example.com:80/socket</code>, it could send
+     title="">ws://example.com/socket</code>, it could send
      them:</p>
 
      <pre>Authorization: Basic d2FsbGU6ZXZl</pre>
 
-     <p>However, it would not send them if the Web Socket was being
-     opened to <code title="">ws://example.com/socket</code>, as that
-     uses a different port (81, not 80).</p>
-
     </div>
 
    </li>
@@ -72505,13 +72492,13 @@
 
    <p>For instance:</p>
 
-   <pre>WebSocket-Location: ws://example.com:80/demo</pre>
+   <pre>WebSocket-Location: ws://example.com/demo</pre>
 
   </div>
 
   <p class="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).</p>
+  for Web Socket protocol connections of the type in question (80 for
+  unencrypted connections and 443 for encrypted connections).</p>
 
   <p>Send another CRLF pair (0x0d 0x0a).</p>
 
@@ -72803,12 +72790,6 @@
   </dl>
 
 
-  <h6>Registration of ports 81 and 815</h6>
-
-  <p>See IANA ticket #257454 for port 81 and IANA ticket #257455 for
-  port 815.</p>
-
-
   <h6>Registration of the "WebSocket" HTTP Upgrade keyword</h6>
 
   <dl>

|