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

Unified Diff: trunk/src/net/websockets/websocket_basic_handshake_stream.cc

Issue 388493002: Revert 282307 "Map WebSocket URL schemes to HTTP URL schemes for..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 5 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 | « trunk/src/net/tools/testserver/testserver.py ('k') | trunk/src/net/websockets/websocket_stream.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/net/websockets/websocket_basic_handshake_stream.cc
===================================================================
--- trunk/src/net/websockets/websocket_basic_handshake_stream.cc (revision 282330)
+++ trunk/src/net/websockets/websocket_basic_handshake_stream.cc (working copy)
@@ -539,11 +539,20 @@
}
void WebSocketBasicHandshakeStream::OnFinishOpeningHandshake() {
+ DCHECK(connect_delegate_);
DCHECK(http_response_info_);
- WebSocketDispatchOnFinishOpeningHandshake(connect_delegate_,
- url_,
- http_response_info_->headers,
- http_response_info_->response_time);
+ scoped_refptr<HttpResponseHeaders> headers = http_response_info_->headers;
+ // If the headers are too large, HttpStreamParser will just not parse them at
+ // all.
+ if (headers) {
+ scoped_ptr<WebSocketHandshakeResponseInfo> response(
+ new WebSocketHandshakeResponseInfo(url_,
+ headers->response_code(),
+ headers->GetStatusText(),
+ headers,
+ http_response_info_->response_time));
+ connect_delegate_->OnFinishOpeningHandshake(response.Pass());
+ }
}
int WebSocketBasicHandshakeStream::ValidateResponse(int rv) {
« no previous file with comments | « trunk/src/net/tools/testserver/testserver.py ('k') | trunk/src/net/websockets/websocket_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698