summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-24 07:18:55 +0000
committerukai@chromium.org <ukai@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-24 07:18:55 +0000
commit39adec79a72d0fa6c2bd0d134cb10485c9c8274e (patch)
tree0c59b78534c60daefe9e63d03f2e30d00d4a7ee4 /net
parent978df34538607d50bf4690f2d679c1bef860398c (diff)
downloadchromium_src-39adec79a72d0fa6c2bd0d134cb10485c9c8274e.zip
chromium_src-39adec79a72d0fa6c2bd0d134cb10485c9c8274e.tar.gz
chromium_src-39adec79a72d0fa6c2bd0d134cb10485c9c8274e.tar.bz2
Reduce DLOG in websocket code
BUG=28657 TEST=none Review URL: http://codereview.chromium.org/440005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32919 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/websockets/websocket.cc13
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;
}