diff options
author | tyoshino@chromium.org <tyoshino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-11 13:11:05 +0000 |
---|---|---|
committer | tyoshino@chromium.org <tyoshino@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-11 13:11:05 +0000 |
commit | df8c45110a92a4383ae2b834f60dc5d9c41eeb64 (patch) | |
tree | 9a8dff01f991ed0dbe7ef9c170988aea526f899f | |
parent | 7cf7c324d6e0937448a17d7b846468a90897cb8b (diff) | |
download | chromium_src-df8c45110a92a4383ae2b834f60dc5d9c41eeb64.zip chromium_src-df8c45110a92a4383ae2b834f60dc5d9c41eeb64.tar.gz chromium_src-df8c45110a92a4383ae2b834f60dc5d9c41eeb64.tar.bz2 |
Rename status_line in WebSocketHandshakeRequestHandler to request_line
This class handles handshake requests. status_line and status_line_ in
this class is actually handling Request-line.
Review URL: https://codereview.chromium.org/26225007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228175 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/websockets/websocket_handshake_handler.cc | 18 | ||||
-rw-r--r-- | net/websockets/websocket_handshake_handler.h | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/net/websockets/websocket_handshake_handler.cc b/net/websockets/websocket_handshake_handler.cc index c304842..0fd67f9 100644 --- a/net/websockets/websocket_handshake_handler.cc +++ b/net/websockets/websocket_handshake_handler.cc @@ -29,16 +29,16 @@ const int kVersionHeaderValueForRFC6455 = 13; // response). void ParseHandshakeHeader( const char* handshake_message, int len, - std::string* status_line, + std::string* request_line, std::string* headers) { size_t i = base::StringPiece(handshake_message, len).find_first_of("\r\n"); if (i == base::StringPiece::npos) { - *status_line = std::string(handshake_message, len); + *request_line = std::string(handshake_message, len); *headers = ""; return; } - // |status_line| includes \r\n. - *status_line = std::string(handshake_message, i + 2); + // |request_line| includes \r\n. + *request_line = std::string(handshake_message, i + 2); int header_len = len - (i + 2) - 2; if (header_len > 0) { @@ -166,7 +166,7 @@ bool WebSocketHandshakeRequestHandler::ParseRequest( ParseHandshakeHeader(input.data(), input_header_length, - &status_line_, + &request_line_, &headers_); if (!CheckVersionInRequest(headers_)) { @@ -200,9 +200,9 @@ HttpRequestInfo WebSocketHandshakeRequestHandler::GetRequestInfo( const GURL& url, std::string* challenge) { HttpRequestInfo request_info; request_info.url = url; - size_t method_end = base::StringPiece(status_line_).find_first_of(" "); + size_t method_end = base::StringPiece(request_line_).find_first_of(" "); if (method_end != base::StringPiece::npos) - request_info.method = std::string(status_line_.data(), method_end); + request_info.method = std::string(request_line_.data(), method_end); request_info.extra_headers.Clear(); request_info.extra_headers.AddHeadersFromString(headers_); @@ -292,10 +292,10 @@ bool WebSocketHandshakeRequestHandler::GetRequestHeaderBlock( } std::string WebSocketHandshakeRequestHandler::GetRawRequest() { - DCHECK(!status_line_.empty()); + DCHECK(!request_line_.empty()); DCHECK(!headers_.empty()); - std::string raw_request = status_line_ + headers_ + "\r\n"; + std::string raw_request = request_line_ + headers_ + "\r\n"; raw_length_ = raw_request.size(); return raw_request; } diff --git a/net/websockets/websocket_handshake_handler.h b/net/websockets/websocket_handshake_handler.h index f307115..ee3749f 100644 --- a/net/websockets/websocket_handshake_handler.h +++ b/net/websockets/websocket_handshake_handler.h @@ -59,7 +59,7 @@ class NET_EXPORT_PRIVATE WebSocketHandshakeRequestHandler { size_t raw_length() const; private: - std::string status_line_; + std::string request_line_; std::string headers_; int original_length_; int raw_length_; |