Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Unified Diff: net/server/http_server.cc

Issue 1340523002: Fix WebSocketServer extension parser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ws-constructor-fix
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/net.gypi ('k') | net/server/web_socket.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/server/http_server.cc
diff --git a/net/server/http_server.cc b/net/server/http_server.cc
index 3abd44df9d691aede81ecdd2a46f346053f9c6c1..f3560e8cabd02660da9dd6e10eafece6fa7c6503 100644
--- a/net/server/http_server.cc
+++ b/net/server/http_server.cc
@@ -236,11 +236,8 @@ int HttpServer::HandleReadResult(HttpConnection* connection, int rv) {
connection->socket()->GetPeerAddress(&request.peer);
if (request.HasHeaderValue("connection", "upgrade")) {
- scoped_ptr<WebSocket> websocket =
- WebSocket::CreateWebSocket(this, connection, request);
- if (!websocket) // Not enough data was received.
- break;
- connection->SetWebSocket(websocket.Pass());
+ connection->SetWebSocket(
+ make_scoped_ptr(new WebSocket(this, connection)));
read_buf->DidConsume(pos);
delegate_->OnWebSocketRequest(connection->id(), request);
if (HasClosedConnection(connection))
« no previous file with comments | « net/net.gypi ('k') | net/server/web_socket.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698