Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(97)

Side by Side Diff: net/websockets/websocket_handshake_constants.h

Issue 1340523002: Fix WebSocketServer extension parser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ws-constructor-fix
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // A set of common constants that are needed for the WebSocket handshake. 5 // A set of common constants that are needed for the WebSocket handshake.
6 // In general, you should prefer using these constants to literal strings, 6 // In general, you should prefer using these constants to literal strings,
7 // except in tests. 7 // except in tests.
8 // 8 //
9 // These constants cannot be used in files that are compiled on iOS, because 9 // These constants cannot be used in files that are compiled on iOS, because
10 // this file is not compiled on iOS. 10 // this file is not compiled on iOS.
11 11
12 #ifndef NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_CONSTANTS_H_ 12 #ifndef NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_CONSTANTS_H_
13 #define NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_CONSTANTS_H_ 13 #define NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_CONSTANTS_H_
14 14
15 #include "base/basictypes.h" 15 #include "base/basictypes.h"
16 #include "net/base/net_export.h"
16 17
17 // This file plases constants inside the ::net::websockets namespace to avoid 18 // This file plases constants inside the ::net::websockets namespace to avoid
18 // risk of collisions with other symbols in libnet. 19 // risk of collisions with other symbols in libnet.
19 namespace net { 20 namespace net {
20 namespace websockets { 21 namespace websockets {
21 22
22 // "HTTP/1.1" 23 // "HTTP/1.1"
23 // RFC6455 only requires HTTP/1.1 "or better" but in practice an HTTP version 24 // RFC6455 only requires HTTP/1.1 "or better" but in practice an HTTP version
24 // other than 1.1 should not occur in a WebSocket handshake. 25 // other than 1.1 should not occur in a WebSocket handshake.
25 extern const char kHttpProtocolVersion[]; 26 extern const char kHttpProtocolVersion[];
(...skipping 19 matching lines...) Expand all
45 // This implementation only supports one version of the WebSocket protocol, 46 // This implementation only supports one version of the WebSocket protocol,
46 // "13", as specified in RFC6455. If support for multiple versions is added in 47 // "13", as specified in RFC6455. If support for multiple versions is added in
47 // future, it will probably no longer be worth having a constant for this. 48 // future, it will probably no longer be worth having a constant for this.
48 extern const char kSupportedVersion[]; 49 extern const char kSupportedVersion[];
49 50
50 // "Upgrade" 51 // "Upgrade"
51 extern const char kUpgrade[]; 52 extern const char kUpgrade[];
52 53
53 // "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" as defined in section 4.1 of 54 // "258EAFA5-E914-47DA-95CA-C5AB0DC85B11" as defined in section 4.1 of
54 // RFC6455. 55 // RFC6455.
55 extern const char kWebSocketGuid[]; 56 extern const char NET_EXPORT kWebSocketGuid[];
56 57
57 // Colon-prefixed lowercase headers for SPDY3. 58 // Colon-prefixed lowercase headers for SPDY3.
58 59
59 // ":sec-websocket-protocol" 60 // ":sec-websocket-protocol"
60 extern const char kSecWebSocketProtocolSpdy3[]; 61 extern const char kSecWebSocketProtocolSpdy3[];
61 62
62 // ":sec-websocket-extensions" 63 // ":sec-websocket-extensions"
63 extern const char kSecWebSocketExtensionsSpdy3[]; 64 extern const char kSecWebSocketExtensionsSpdy3[];
64 65
65 // Some parts of the code require lowercase versions of the header names in 66 // Some parts of the code require lowercase versions of the header names in
(...skipping 14 matching lines...) Expand all
80 extern const char kUpgradeLowercase[]; 81 extern const char kUpgradeLowercase[];
81 82
82 // "websocket", as used in the "Upgrade:" header. This is always lowercase 83 // "websocket", as used in the "Upgrade:" header. This is always lowercase
83 // (except in obsolete versions of the protocol). 84 // (except in obsolete versions of the protocol).
84 extern const char kWebSocketLowercase[]; 85 extern const char kWebSocketLowercase[];
85 86
86 } // namespace websockets 87 } // namespace websockets
87 } // namespace net 88 } // namespace net
88 89
89 #endif // NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_CONSTANTS_H_ 90 #endif // NET_WEBSOCKETS_WEBSOCKET_HANDSHAKE_CONSTANTS_H_
OLDNEW
« net/websockets/websocket_extension.cc ('K') | « net/websockets/websocket_extension_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698