diff options
author | Kristian Monsen <kristianm@google.com> | 2010-06-28 16:42:48 +0100 |
---|---|---|
committer | Kristian Monsen <kristianm@google.com> | 2010-07-02 10:29:56 +0100 |
commit | 06ea8e899e48f1f2f396b70e63fae369f2f23232 (patch) | |
tree | 20c1428cd05c76f32394ab354ea35ed99acd86d8 /WebCore/websockets/WebSocketHandshakeRequest.h | |
parent | 72aad67af14193199e29cdd5c4ddc095a8b9a8a8 (diff) | |
download | external_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.zip external_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.tar.gz external_webkit-06ea8e899e48f1f2f396b70e63fae369f2f23232.tar.bz2 |
Merge WebKit at r61871: Initial merge by git.
Change-Id: I6cff43abca9cc4782e088a469ad4f03f166a65d5
Diffstat (limited to 'WebCore/websockets/WebSocketHandshakeRequest.h')
-rw-r--r-- | WebCore/websockets/WebSocketHandshakeRequest.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/WebCore/websockets/WebSocketHandshakeRequest.h b/WebCore/websockets/WebSocketHandshakeRequest.h index d488135..792f67e 100644 --- a/WebCore/websockets/WebSocketHandshakeRequest.h +++ b/WebCore/websockets/WebSocketHandshakeRequest.h @@ -33,37 +33,37 @@ #if ENABLE(WEB_SOCKETS) +#include "HTTPHeaderMap.h" #include "KURL.h" #include "PlatformString.h" -#include <wtf/Vector.h> namespace WebCore { -class AtomicString; - class WebSocketHandshakeRequest { public: - WebSocketHandshakeRequest(const KURL&, const String& origin, const String& webSocketProtocol); + WebSocketHandshakeRequest(const String& requestMethod, const KURL&); ~WebSocketHandshakeRequest(); - // According to current Web Socket protocol specification, four mandatory headers (Upgrade, Connection, Host, and Origin) and - // one optional header (WebSocket-Protocol) should be sent in this order, at the beginning of the handshake request. - // The remaining headers can be set by using the following function. - void addExtraHeaderField(const AtomicString& name, const String& value); - void addExtraHeaderField(const char* name, const String& value); + String requestMethod() const; + KURL url() const; - // Returns the list of header fields including five special ones. - typedef std::pair<AtomicString, String> HeaderField; - Vector<HeaderField> headerFields() const; + const HTTPHeaderMap& headerFields() const; + void addHeaderField(const char* name, const String& value); -private: - String host() const; + struct Key3 { + unsigned char value[8]; + Key3(); + void set(const unsigned char key3[8]); + }; + Key3 key3() const; + void setKey3(const unsigned char key3[8]); + +private: KURL m_url; - bool m_secure; - String m_origin; - String m_webSocketProtocol; - Vector<HeaderField> m_extraHeaderFields; + String m_requestMethod; + HTTPHeaderMap m_headerFields; + Key3 m_key3; }; } // namespace WebCore |