idnits 2.17.1 draft-hixie-thewebsocketprotocol-15.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.ii or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. See https://trustee.ietf.org/license-info/.) Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([HTML5]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document doesn't use any RFC 2119 keywords, yet has text resembling RFC 2119 boilerplate text. -- The document date (June 5, 2009) is 5437 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) -- Possible downref: Non-RFC (?) normative reference: ref. 'HTML5' ** Obsolete normative reference: RFC 2109 (Obsoleted by RFC 2965) ** Obsolete normative reference: RFC 2246 (Obsoleted by RFC 4346) ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 2965 (Obsoleted by RFC 6265) Summary: 6 errors (**), 0 flaws (~~), 2 warnings (==), 2 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group I. Hickson 3 Internet-Draft Google, Inc. 4 Intended status: Standards Track June 5, 2009 5 Expires: December 7, 2009 7 The Web Socket protocol 8 draft-hixie-thewebsocketprotocol-15 10 Status of this Memo 12 This Internet-Draft is submitted to IETF in full conformance with the 13 provisions of BCP 78 and BCP 79. 15 Internet-Drafts are working documents of the Internet Engineering 16 Task Force (IETF), its areas, and its working groups. Note that 17 other groups may also distribute working documents as Internet- 18 Drafts. 20 Internet-Drafts are draft documents valid for a maximum of six months 21 and may be updated, replaced, or obsoleted by other documents at any 22 time. It is inappropriate to use Internet-Drafts as reference 23 material or to cite them other than as "work in progress." 25 The list of current Internet-Drafts can be accessed at 26 http://www.ietf.org/ietf/1id-abstracts.txt. 28 The list of Internet-Draft Shadow Directories can be accessed at 29 http://www.ietf.org/shadow.html. 31 This Internet-Draft will expire on December 7, 2009. 33 Copyright Notice 35 Copyright (c) 2009 IETF Trust and the persons identified as the 36 document authors. All rights reserved. 38 This document is subject to BCP 78 and the IETF Trust's Legal 39 Provisions Relating to IETF Documents in effect on the date of 40 publication of this document (http://trustee.ietf.org/license-info). 41 Please review these documents carefully, as they describe your rights 42 and restrictions with respect to this document. 44 Abstract 46 This protocol enables two-way communication between a user agent 47 running untrusted code running in a controlled environment to a 48 remote host that understands the protocol. It is intended to fail to 49 communicate with servers of pre-existing protocols like SMTP or HTTP, 50 while allowing HTTP servers to opt-in to supporting this protocol if 51 desired. It is designed to be easy to implement on the server side. 53 Author's note 55 This document is automatically generated from, and is therefore a 56 subset of, the HTML5 specification produced by the WHATWG. [HTML5] 58 Table of Contents 60 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 61 2. Conformance requirements . . . . . . . . . . . . . . . . . . . 5 62 3. Client-side requirements . . . . . . . . . . . . . . . . . . . 6 63 3.1. Handshake . . . . . . . . . . . . . . . . . . . . . . . . 6 64 3.2. Data framing . . . . . . . . . . . . . . . . . . . . . . . 13 65 4. Server-side requirements . . . . . . . . . . . . . . . . . . . 15 66 4.1. Minimal handshake . . . . . . . . . . . . . . . . . . . . 15 67 4.2. Handshake details . . . . . . . . . . . . . . . . . . . . 16 68 4.3. Data framing . . . . . . . . . . . . . . . . . . . . . . . 17 69 5. Closing the connection . . . . . . . . . . . . . . . . . . . . 18 70 6. Security considerations . . . . . . . . . . . . . . . . . . . 19 71 7. IANA considerations . . . . . . . . . . . . . . . . . . . . . 20 72 8. Normative References . . . . . . . . . . . . . . . . . . . . . 21 73 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 22 75 1. Introduction 77 ** ISSUE ** ... 79 2. Conformance requirements 81 All diagrams, examples, and notes in this specification are non- 82 normative, as are all sections explicitly marked non-normative. 83 Everything else in this specification is normative. 85 The key words "MUST", "MUST NOT", "REQUIRED", "SHOULD", "SHOULD NOT", 86 "RECOMMENDED", "MAY", and "OPTIONAL" in the normative parts of this 87 document are to be interpreted as described in RFC2119. For 88 readability, these words do not appear in all uppercase letters in 89 this specification. [RFC2119] 91 Requirements phrased in the imperative as part of algorithms (such as 92 "strip any leading space characters" or "return false and abort these 93 steps") are to be interpreted with the meaning of the key word 94 ("must", "should", "may", etc) used in introducing the algorithm. 96 Conformance requirements phrased as algorithms or specific steps may 97 be implemented in any manner, so long as the end result is 98 equivalent. (In particular, the algorithms defined in this 99 specification are intended to be easy to follow, and not intended to 100 be performant.) 102 Implementations may impose implementation-specific limits on 103 otherwise unconstrained inputs, e.g. to prevent denial of service 104 attacks, to guard against running out of memory, or to work around 105 platform-specific limitations. 107 The conformance classes defined by this specification are user agents 108 and servers. 110 3. Client-side requirements 112 _This section only applies to user agents, not to servers._ 114 NOTE: This specification doesn't currently define a limit to the 115 number of simultaneous connections that a client can establish to a 116 server. 118 3.1. Handshake 120 When the user agent is to *establish a Web Socket connection* to a 121 host /host/, optionally on port /port/, from an origin /origin/, with 122 a flag /secure/, with a particular /resource name/, and optionally 123 with a particular /protocol/, it must run the following steps. 125 NOTE: The /host/ and /origin/ strings will be all-lowercase when this 126 algorithm is invoked. 128 1. If there is no explicit /port/, then: if /secure/ is false, let 129 /port/ be 81, otherwise let /port/ be 815. 131 2. If the user agent already has a Web Socket connection to the 132 remote host identified by /host/ (even if known by another 133 name), wait until that connection has been established or for 134 that connection to have failed. 136 NOTE: This makes it harder for a script to perform a denial of 137 service attack by just opening a large number of Web Socket 138 connections to a remote host. 140 NOTE: There is no limit to the number of established Web Socket 141 connections a user agent can have with a single remote host. 142 Servers can refuse to connect users with an excessive number of 143 connections, or disconnect resource-hogging users when suffering 144 high load. 146 3. If the user agent is configured to use a proxy to connect to 147 host /host/ and/or port /port/, then connect to that proxy and 148 ask it to open a TCP/IP connection to the host given by /host/ 149 and the port given by /port/. 151 EXAMPLE: For example, if the user agent uses an HTTP proxy 152 for all traffic, then if it was to try to connect to port 80 153 on server example.com, it might send the following lines to 154 the proxy server: 156 CONNECT example.com:80 HTTP/1.1 157 Host: example.com 159 If there was a password, the connection might look like: 161 CONNECT example.com:80 HTTP/1.1 162 Host: example.com 163 Proxy-authorization: Basic ZWRuYW1vZGU6bm9jYXBlcyE= 165 Otherwise, if the user agent is not configured to use a proxy, 166 then open a TCP/IP connection to the host given by /host/ and 167 the port given by /port/. 169 4. If the connection could not be opened, then fail the Web Socket 170 connection and abort these steps. 172 5. If /secure/ is true, perform a TLS handshake over the 173 connection. If this fails (e.g. the server's certificate could 174 not be verified), then fail the Web Socket connection and abort 175 these steps. Otherwise, all further communication on this 176 channel must run through the encrypted tunnel. [RFC2246] 178 6. Send the following bytes to the remote side (the server): 180 47 45 54 20 182 Send the /resource name/ value, encoded as US-ASCII. 184 Send the following bytes: 186 20 48 54 54 50 2f 31 2e 31 0d 0a 55 70 67 72 61 187 64 65 3a 20 57 65 62 53 6f 63 6b 65 74 0d 0a 43 188 6f 6e 6e 65 63 74 69 6f 6e 3a 20 55 70 67 72 61 189 64 65 0d 0a 191 NOTE: The string "GET ", the path, " HTTP/1.1", CRLF, the string 192 "Upgrade: WebSocket", CRLF, and the string "Connection: 193 Upgrade", CRLF. 195 7. Send the following bytes: 197 48 6f 73 74 3a 20 199 Send the /host/ value, encoded as US-ASCII. 201 Send the following bytes: 203 0d 0a 205 NOTE: The string "Host: ", the host, and CRLF. 207 8. Send the following bytes: 209 4f 72 69 67 69 6e 3a 20 211 Send the /origin/ value, encoded as US-ASCII. 213 NOTE: The /origin/ value is a string that was passed to this 214 algorithm. 216 Send the following bytes: 218 0d 0a 220 NOTE: The string "Origin: ", the origin, and CRLF. 222 9. If there is no /protocol/, then skip this step. 224 Otherwise, send the following bytes: 226 57 65 62 53 6f 63 6b 65 74 2d 50 72 6f 74 6f 63 227 6f 6c 3a 20 229 Send the /protocol/ value, encoded as US-ASCII. 231 Send the following bytes: 233 0d 0a 235 NOTE: The string "WebSocket-Protocol: ", the protocol, and CRLF. 237 10. If the client has any authentication information or cookies that 238 would be relevant to a resource accessed over HTTP, if /secure/ 239 is false, or HTTPS, if it is true, on host /host/, port /port/, 240 with /resource name/ as the path (and possibly query 241 parameters), then HTTP headers that would be appropriate for 242 that information should be sent at this point. [RFC2616] 243 [RFC2109] [RFC2965] 245 Each header must be on a line of its own (each ending with a CR 246 LF sequence). For the purposes of this step, each header must 247 not be split into multiple lines (despite HTTP otherwise 248 allowing this with continuation lines). 250 EXAMPLE: For example, if the server had a username and 251 password that applied to |http://example.com/socket|, and the 252 Web Socket was being opened to |ws://example.com:80/socket|, 253 it could send them: 255 Authorization: Basic d2FsbGU6ZXZl 257 However, it would not send them if the Web Socket was being 258 opened to |ws://example.com/socket|, as that uses a different 259 port (81, not 80). 261 11. Send the following bytes: 263 0d 0a 265 NOTE: Just a CRLF (a blank line). 267 12. Read the first 85 bytes from the server. If the connection 268 closes before 85 bytes are received, or if the first 85 bytes 269 aren't exactly equal to the following bytes, then fail the Web 270 Socket connection and abort these steps. 272 48 54 54 50 2f 31 2e 31 20 31 30 31 20 57 65 62 273 20 53 6f 63 6b 65 74 20 50 72 6f 74 6f 63 6f 6c 274 20 48 61 6e 64 73 68 61 6b 65 0d 0a 55 70 67 72 275 61 64 65 3a 20 57 65 62 53 6f 63 6b 65 74 0d 0a 276 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 55 70 67 72 277 61 64 65 0d 0a 279 NOTE: The string "HTTP/1.1 101 Web Socket Protocol Handshake", 280 CRLF, the string "Upgrade: WebSocket", CRLF, the string 281 "Connection: Upgrade", CRLF. 283 13. Let /headers/ be a list of name-value pairs, initially empty. 285 14. _Header_: Let /name/ and /value/ be empty byte arrays. 287 15. Read a byte from the server. 289 If the connection closes before this byte is received, then fail 290 the Web Socket connection and abort these steps. 292 Otherwise, handle the byte as described in the appropriate entry 293 below: 295 -> If the byte is 0x0d (ASCII CR) 296 If the /name/ byte array is empty, then jump to the headers 297 processing step. Otherwise, fail the Web Socket connection 298 and abort these steps. 300 -> If the byte is 0x0a (ASCII LF) 301 Fail the Web Socket connection and abort these steps. 303 -> If the byte is 0x3a (ASCII ":") 304 Move on to the next step. 306 -> If the byte is in the range 0x41 .. 0x5a (ASCII "A" .. "Z") 307 Append a byte whose value is the byte's value plus 0x20 to 308 the /name/ byte array and redo this step for the next byte. 310 -> Otherwise 311 Append the byte to the /name/ byte array and redo this step 312 for the next byte. 314 NOTE: This reads a header name, terminated by a colon, 315 converting upper-case ASCII letters to lowercase, and aborting 316 if a stray CR or LF is found. 318 16. Read a byte from the server. 320 If the connection closes before this byte is received, then fail 321 the Web Socket connection and abort these steps. 323 Otherwise, handle the byte as described in the appropriate entry 324 below: 326 -> If the byte is 0x20 (ASCII space) 327 Ignore the byte and move on to the next step. 329 -> Otherwise 330 Treat the byte as described by the list in the next step, 331 then move on to that next step for real. 333 NOTE: This skips past a space character after the colon, if 334 necessary. 336 17. Read a byte from the server. 338 If the connection closes before this byte is received, then fail 339 the Web Socket connection and abort these steps. 341 Otherwise, handle the byte as described in the appropriate entry 342 below: 344 -> If the byte is 0x0d (ASCII CR) 345 Move on to the next step. 347 -> If the byte is 0x0a (ASCII LF) 348 Fail the Web Socket connection and abort these steps. 350 -> Otherwise 351 Append the byte to the /name/ byte array and redo this step 352 for the next byte. 354 NOTE: This reads a header value, terminated by a CRLF. 356 18. Read a byte from the server. 358 If the connection closes before this byte is received, or if the 359 byte is not a 0x0a byte (ASCII LF), then fail the Web Socket 360 connection and abort these steps. 362 NOTE: This skips past the LF byte of the CRLF after the header. 364 19. Append an entry to the /headers/ list that has the name given by 365 the string obtained by interpreting the /name/ byte array as a 366 UTF-8 byte stream and the value given by the string obtained by 367 interpreting the /value/ byte array as a UTF-8 byte stream. 369 20. Return to the "Header" step above. 371 21. _Headers processing_: If there is not exactly one entry in the 372 /headers/ list whose name is "websocket-origin", or if there is 373 not exactly one entry in the /headers/ list whose name is 374 "websocket-location", or if the /protocol/ was specified but 375 there is not exactly one entry in the /headers/ list whose name 376 is "websocket-protocol", or if there are any entries in the 377 /headers/ list whose names are the empty string, then fail the 378 Web Socket connection and abort these steps. 380 22. Read a byte from the server. 382 If the connection closes before this byte is received, or if the 383 byte is not a 0x0a byte (ASCII LF), then fail the Web Socket 384 connection and abort these steps. 386 NOTE: This skips past the LF byte of the CRLF after the blank 387 line after the headers. 389 23. Handle each entry in the /headers/ list as follows: 391 -> If the entry's name is "websocket-origin|" 392 If the value is not exactly equal to /origin/, converted to 393 ASCII lowercase, then fail the Web Socket connection and 394 abort these steps. 396 -> If the entry's name is "websocket-location|" 397 If the value is not exactly equal to a string consisting of 398 the following components in the same order, then fail the Web 399 Socket connection and abort these steps: 401 1. The string "ws" if /secure/ is false and "wss" if 402 /secure/ is true 404 2. The three characters "://". 406 3. The value of /host/. 408 4. If /secure/ is false and /port/ is not 81, or if /secure/ 409 is true and /port/ is not 815: a ":" character followed 410 by the value of /port/. 412 5. The value of /resource name/. 414 -> If the entry's name is "websocket-protocol|" 415 If there was a /protocol/ specified, and the value is not 416 exactly equal to /protocol/, then fail the Web Socket 417 connection and abort these steps. (If no /protocol/ was 418 specified, the header is ignored.) 420 -> If the entry's name is "set-cookie|" or "set-cookie2|" or 421 another cookie-related header name 422 Handle the cookie as defined by the appropriate spec, with 423 the resource being the one with the host /host/, the port 424 /port/, the path (and possibly query parameters) /resource 425 name/, and the scheme |http| if /secure/ is false and |https| 426 if /secure/ is true. [RFC2109] [RFC2965] 428 -> Any other name 429 Ignore it. 431 24. The *Web Socket connection is established*. Now the user agent 432 must send and receive to and from the connection as described in 433 the next section. 435 To *fail the Web Socket connection*, the user agent must close the 436 Web Socket connection, and may report the problem to the user (which 437 would be especially useful for developers). However, user agents 438 must not convey the failure information to the script that attempted 439 the connection in a way distinguishable from the Web Socket being 440 closed normally. 442 3.2. Data framing 444 Once a Web Socket connection is established, the user agent must run 445 through the following state machine for the bytes sent by the server. 447 1. Try to read a byte from the server. Let /frame type/ be that 448 byte. 450 If no byte could be read because the Web Socket connection is 451 closed, then abort. 453 2. Handle the /frame type/ byte as follows: 455 If the high-order bit of the /frame type/ byte is set (i.e. if 456 /frame type/ _and_ed with 0x80 returns 0x80) 457 Run these steps. If at any point during these steps a read is 458 attempted but fails because the Web Socket connection is 459 closed, then abort. 461 1. Let /length/ be zero. 463 2. _Length_: Read a byte, let /b/ be that byte. 465 3. Let /b_v/ be integer corresponding to the low 7 bits of 466 /b/ (the value you would get by _and_ing /b/ with 0x7f). 468 4. Multiply /length/ by 128, add /b_v/ to that result, and 469 store the final result in /length/. 471 5. If the high-order bit of /b/ is set (i.e. if /b/ _and_ed 472 with 0x80 returns 0x80), then return to the step above 473 labeled _length_. 475 6. Read /length/ bytes. 477 7. Discard the read bytes. 479 If the high-order bit of the /frame type/ byte is _not_ set (i.e. 480 if /frame type/ _and_ed with 0x80 returns 0x00) 481 Run these steps. If at any point during these steps a read is 482 attempted but fails because the Web Socket connection is 483 closed, then abort. 485 1. Let /raw data/ be an empty byte array. 487 2. _Data_: Read a byte, let /b/ be that byte. 489 3. If /b/ is not 0xff, then append /b/ to /raw data/ and 490 return to the previous step (labeled _data_). 492 4. Interpret /raw data/ as a UTF-8 string, and store that 493 string in /data/. 495 5. If /frame type/ is 0x00, then *a message has been 496 received* with text /data/. Otherwise, discard the data. 498 3. Return to the first step to read the next byte. 500 If the user agent is faced with content that is too large to be 501 handled appropriately, then it must fail the Web Socket connection. 503 Once a Web Socket connection is established, the user agent must use 504 the following steps to *send /data/ using the Web Socket*: 506 1. Send a 0x00 byte to the server. 508 2. Encode /data/ using UTF-8 and send the resulting byte stream to 509 the server. 511 3. Send a 0xff byte to the server. 513 4. Server-side requirements 515 _This section only applies to servers._ 517 4.1. Minimal handshake 519 NOTE: This section describes the minimal requirements for a server- 520 side implementation of Web Sockets. 522 Listen on a port for TCP/IP. Upon receiving a connection request, 523 open a connection and send the following bytes back to the client: 525 48 54 54 50 2f 31 2e 31 20 31 30 31 20 57 65 62 526 20 53 6f 63 6b 65 74 20 50 72 6f 74 6f 63 6f 6c 527 20 48 61 6e 64 73 68 61 6b 65 0d 0a 55 70 67 72 528 61 64 65 3a 20 57 65 62 53 6f 63 6b 65 74 0d 0a 529 43 6f 6e 6e 65 63 74 69 6f 6e 3a 20 55 70 67 72 530 61 64 65 0d 0a 532 Send the string "WebSocket-Origin" followed by a U+003A COLON (":") 533 followed by the ASCII serialization of the origin from which the 534 server is willing to accept connections, followed by a CRLF pair 535 (0x0d 0x0a). 537 For instance: 539 WebSocket-Origin: http://example.com 541 Send the string "WebSocket-Location" followed by a U+003A COLON (":") 542 followed by the URL of the Web Socket script, followed by a CRLF pair 543 (0x0d 0x0a). 545 For instance: 547 WebSocket-Location: ws://example.com:80/demo 549 Send another CRLF pair (0x0d 0x0a). 551 Read data from the client until four bytes 0x0d 0x0a 0x0d 0x0a are 552 read. This data must either be discarded or handled as described in 553 the following section describing the handshake details. 555 If the connection isn't dropped at this point, go to the data framing 556 section. 558 4.2. Handshake details 560 The previous section ignores the data that is transmitted by the 561 client during the handshake. 563 The data sent by the client consists of a number of fields separated 564 by CR LF pairs (bytes 0x0d 0x0a). 566 The first field consists of three tokens separated by space 567 characters (byte 0x20). The middle token is the path being opened. 568 If the server supports multiple paths, then the server should echo 569 the value of this field in the initial handshake, as part of the URL 570 given on the |WebSocket-Location| line (after the appropriate scheme 571 and host). 573 If the first field does not have three tokens, the server should 574 abort the connection as it probably represents an errorneous client. 576 The remaining fields consist of name-value pairs, with the name part 577 separated from the value part by a colon and a space (bytes 0x3a 578 0x20). Of these, several are interesting: 580 Host (bytes 48 6f 73 74) 581 The value gives the hostname that the client intended to use when 582 opening the Web Socket. It would be of interest in particular to 583 virtual hosting environments, where one server might serve 584 multiple hosts, and might therefore want to return different data. 586 The right host has to be output as part of the URL given on the 587 |WebSocket-Location| line of the handshake described above, to 588 verify that the server knows that it is really representing that 589 host. 591 Origin (bytes 4f 72 69 67 69 6e) 592 The value gives the scheme, hostname, and port (if it's not the 593 default port for the given scheme) of the page that asked the 594 client to open the Web Socket. It would be interesting if the 595 server's operator had deals with operators of other sites, since 596 the server could then decide how to respond (or indeed, _whether_ 597 to respond) based on which site was requesting a connection. 599 If the server supports connections from more than one origin, then 600 the server should echo the value of this field in the initial 601 handshake, on the |WebSocket-Origin| line. 603 Other fields 604 Other fields can be used, such as "Cookie" or "Authorization", for 605 authentication purposes. 607 Any fields that lack the colon-space separator should be discarded 608 and may cause the server to disconnect. 610 4.3. Data framing 612 NOTE: This section only describes how to handle content that this 613 specification allows user agents to send (text). It doesn't handle 614 any arbitrary content in the same way that the requirements on user 615 agents defined earlier handle any content including possible future 616 extensions to the protocols. 618 The server must run through the following steps to process the bytes 619 sent by the client: 621 1. Read a byte from the client. Assuming everything is going 622 according to plan, it will be a 0x00 byte. If the byte is not a 623 0x00 byte, then the server may disconnect. 625 2. Let /raw data/ be an empty byte array. 627 3. _Data_: Read a byte, let /b/ be that byte. 629 4. If /b/ is not 0xff, then append /b/ to /raw data/ and return to 630 the previous step (labeled _data_). 632 5. Interpret /raw data/ as a UTF-8 string, and apply whatever 633 server-specific processing is to occur for the resulting string. 635 6. Return to the first step to read the next byte. 637 The server must run through the following steps to send strings to 638 the client: 640 1. Send a 0x00 byte to the client to indicate the start of a string. 642 2. Encode /data/ using UTF-8 and send the resulting byte stream to 643 the client. 645 3. Send a 0xff byte to the client to indicate the end of the 646 message. 648 5. Closing the connection 650 To *close the Web Socket connection*, either the user agent or the 651 server closes the TCP/IP connection. There is no closing handshake. 652 Whether the user agent or the server closes the connection, it is 653 said that the *Web Socket connection is closed*. 655 Servers may close the Web Socket connection whenever desired. 657 User agents should not close the Web Socket connection arbitrarily. 659 6. Security considerations 661 ** ISSUE ** ... 663 7. IANA considerations 665 ** ISSUE ** ...(two URI schemes, two ports, HTTP Upgrade keyword) 667 8. Normative References 669 [HTML5] Hickson, I., "HTML5", June 2009. 671 [RFC2109] Kristol, D. and L. Montulli, "HTTP State Management 672 Mechanism", RFC 2109, February 1997. 674 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 675 Requirement Levels", BCP 14, RFC 2119, March 1997. 677 [RFC2246] Dierks, T. and C. Allen, "The TLS Protocol Version 1.0", 678 RFC 2246, January 1999. 680 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., 681 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 682 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 684 [RFC2965] Kristol, D. and L. Montulli, "HTTP State Management 685 Mechanism", RFC 2965, October 2000. 687 Author's Address 689 Ian Hickson 690 Google, Inc. 692 Email: ian@hixie.ch 693 URI: http://ln.hixie.ch/