diff options
author | ukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-26 06:55:23 +0000 |
---|---|---|
committer | ukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-26 06:55:23 +0000 |
commit | 41c596cb7a6e7f3246428beff9ac72228a92b1c9 (patch) | |
tree | 215e991313033e48072a45fd94a8eb8f48e20409 /net | |
parent | 3454b5a0a244d9f672094586c9d4d9b63978f43a (diff) | |
download | chromium_src-41c596cb7a6e7f3246428beff9ac72228a92b1c9.zip chromium_src-41c596cb7a6e7f3246428beff9ac72228a92b1c9.tar.gz chromium_src-41c596cb7a6e7f3246428beff9ac72228a92b1c9.tar.bz2 |
Merge 32919 - Reduce DLOG in websocket code
BUG=28657
TEST=none
Review URL: http://codereview.chromium.org/440005
TBR=ukai@chromium.org
Review URL: http://codereview.chromium.org/443017
git-svn-id: svn://svn.chromium.org/chrome/branches/249/src@33189 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/websockets/websocket.cc | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/net/websockets/websocket.cc b/net/websockets/websocket.cc index ddef4c0..e588707 100644 --- a/net/websockets/websocket.cc +++ b/net/websockets/websocket.cc @@ -190,7 +190,6 @@ IOBufferWithSize* WebSocket::CreateClientHandshakeMessage() const { } // TODO(ukai): Add cookie if necessary. msg += "\r\n"; - DLOG(INFO) << "ClientHandshake request=" << msg; IOBufferWithSize* buf = new IOBufferWithSize(msg.size()); memcpy(buf->data(), msg.data(), msg.size()); return buf; @@ -203,7 +202,6 @@ int WebSocket::CheckHandshake() { const char *start = current_read_buf_->StartOfBuffer() + read_consumed_len_; const char *p = start; size_t len = current_read_buf_->offset() - read_consumed_len_; - DLOG(INFO) << "ClientHandshake response=" << std::string(start, len); if (len < kServerHandshakeHeaderLength) { return -1; } @@ -245,7 +243,7 @@ int WebSocket::CheckHandshake() { if (header_size < kConnectionHeaderLength) return -1; if (memcmp(p, kConnectionHeader, kConnectionHeaderLength)) { - DLOG(INFO) << "Bad Upgrade Header " + DLOG(INFO) << "Bad Connection Header " << std::string(p, kConnectionHeaderLength); ready_state_ = CLOSED; return p - start; @@ -258,7 +256,8 @@ int WebSocket::CheckHandshake() { scoped_refptr<HttpResponseHeaders> headers( new HttpResponseHeaders(HttpUtil::AssembleRawHeaders(start, eoh))); if (!ProcessHeaders(*headers)) { - DLOG(INFO) << "Process Headers failed"; + DLOG(INFO) << "Process Headers failed: " + << std::string(start, eoh); ready_state_ = CLOSED; return eoh; } @@ -274,9 +273,9 @@ int WebSocket::CheckHandshake() { ready_state_ = CLOSED; break; } - DLOG(INFO) << "CheckHandshake mode=" << mode_ - << " ready_state=" << ready_state_ - << " eoh=" << eoh; + if (ready_state_ == CLOSED) + DLOG(INFO) << "CheckHandshake mode=" << mode_ + << " " << std::string(start, eoh); return eoh; } |