Specify a console message for ERR_EMPTY_RESPONSE

On an empty response from the remote server, we should log the message
"Connection closed before receiving a handshake response".

This partially fixes layout test close-before-handshake-response.html.

BUG=339373
TEST=net_unittests, http/tests/websocket

Review URL: https://codereview.chromium.org/148493009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249659 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/net/websockets/websocket_basic_handshake_stream.cc b/net/websockets/websocket_basic_handshake_stream.cc
index 26e28c8..a8d12fc 100644
--- a/net/websockets/websocket_basic_handshake_stream.cc
+++ b/net/websockets/websocket_basic_handshake_stream.cc
@@ -567,6 +567,11 @@
         return ERR_INVALID_RESPONSE;
     }
   } else {
+    if (rv == ERR_EMPTY_RESPONSE) {
+      failure_message_ =
+          "Connection closed before receiving a handshake response";
+      return rv;
+    }
     failure_message_ =
         std::string("Error during WebSocket handshake: ") + ErrorToString(rv);
     OnFinishOpeningHandshake();