summaryrefslogtreecommitdiffstats
path: root/net/websockets/websocket_throttle.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/websockets/websocket_throttle.cc')
-rw-r--r--net/websockets/websocket_throttle.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/net/websockets/websocket_throttle.cc b/net/websockets/websocket_throttle.cc
index 49bd923..db41248 100644
--- a/net/websockets/websocket_throttle.cc
+++ b/net/websockets/websocket_throttle.cc
@@ -85,16 +85,8 @@ class WebSocketThrottle::WebSocketState : public SocketStream::UserData {
}
buffer_ = new GrowableIOBuffer();
buffer_->SetCapacity(kBufferSize);
- } else {
- if (buffer_->RemainingCapacity() < len) {
- if (!buffer_->SetCapacity(buffer_->capacity() + kBufferSize)) {
- // TODO(ukai): Check more correctly.
- // Seek to the last CR or LF and reduce memory usage.
- LOG(ERROR) << "Too large headers? capacity=" << buffer_->capacity();
- handshake_finished_ = true;
- return OK;
- }
- }
+ } else if (buffer_->RemainingCapacity() < len) {
+ buffer_->SetCapacity(buffer_->capacity() + kBufferSize);
}
memcpy(buffer_->data(), data, len);
buffer_->set_offset(buffer_->offset() + len);