Merge branch '2.5.x'

Closes gh-27511
This commit is contained in:
Andy Wilkinson
2021-07-27 14:37:30 +01:00
2 changed files with 13 additions and 12 deletions

View File

@@ -91,13 +91,12 @@ class Connection {
}
private void runWebSocket() throws Exception {
this.webSocket = true;
String accept = getWebsocketAcceptResponse();
this.outputStream.writeHeaders("HTTP/1.1 101 Switching Protocols", "Upgrade: websocket", "Connection: Upgrade",
"Sec-WebSocket-Accept: " + accept);
new Frame("{\"command\":\"hello\",\"protocols\":[\"http://livereload.com/protocols/official-7\"],"
+ "\"serverName\":\"spring-boot\"}").write(this.outputStream);
Thread.sleep(100);
this.webSocket = true;
while (this.running) {
readWebSocketFrame();
}