虽然教科书很多,但是通信协议等最原始的标准还是各种协议的spec 正好最近看了websocket HTTP Request-Response里一些值的含义和应用,查了下 供其他同学参考和自己memo 出处:http://tools.ietf.org/html/rfc6455#section-11.3.1 [size=1em]11.3. Registration of New HTTP Header Fields[size=1em]11.3.1. Sec-WebSocket-Key This section describes a header field registered in the Permanent Message Header Field Names registry [RFC3864]. Header field name Sec-WebSocket-Key Applicable protocol http Status standard Author/Change controller IETF Specification document(s) RFC 6455 Related information This header field is only used for WebSocket opening handshake. The |Sec-WebSocket-Key| header field is used in the WebSocket opening handshake. It is sent from the client to the server to provide part of the information used by the server to prove that it received a valid WebSocket opening handshake. This helps ensure that the server does not accept connections from non-WebSocket clients (e.g., HTTP clients) that are being abused to send data to unsuspecting WebSocket servers. The |Sec-WebSocket-Key| header field MUST NOT appear more than once in an HTTP request.Fette & Melnikov Standards Track [Page 57] RFC 6455 The WebSocket Protocol December 2011[size=1em]11.3.2. Sec-WebSocket-Extensions This section describes a header field for registration in the Permanent Message Header Field Names registry [RFC3864]. Header field name Sec-WebSocket-Extensions Applicable protocol http Status standard Author/Change controller IETF Specification document(s) RFC 6455 Related information This header field is only used for WebSocket opening handshake. The |Sec-WebSocket-Extensions| header field is used in the WebSocket opening handshake. It is initially sent from the client to the server, and then subsequently sent from the server to the client, to agree on a set of protocol-level extensions to use for the duration of the connection. The |Sec-WebSocket-Extensions| header field MAY appear multiple times in an HTTP request (which is logically the same as a single |Sec-WebSocket-Extensions| header field that contains all values. However, the |Sec-WebSocket-Extensions| header field MUST NOT appear more than once in an HTTP response. |
[技术| 编程·课件·Linux] 【技术memo】WebSocket HTTP Request-Response里的一些 ...
admin
· 发布于 2014-04-14 10:19
· 1328 次阅读
转载文章时务必注明原作者及原始链接,并注明「发表于 软院网 RuanYuan.Net 」,并不得对作品进行修改。