Permalink
Browse files

websocket, bugfix: compatible with new http api.

  • Loading branch information...
xicilion committed Sep 29, 2017
1 parent c66498f commit c258ae41290bba7807c196fadf50fc03ee3470ea
Showing with 12 additions and 8 deletions.
  1. +12 −8 test/ws_test.js
View
@@ -167,10 +167,12 @@ describe('ws', () => {
httpd.run(() => {});
var rep = http.get("http://127.0.0.1:" + (8810 + base_port) + "/", {
"Upgrade": "websocket",
"Connection": "Upgrade",
"Sec-WebSocket-Key": "dGhlIHNhbXBsZSBub25jZQ==",
"Sec-WebSocket-Version": "13"
headers: {
"Upgrade": "websocket",
"Connection": "Upgrade",
"Sec-WebSocket-Key": "dGhlIHNhbXBsZSBub25jZQ==",
"Sec-WebSocket-Version": "13"
}
});
assert.equal(rep.firstHeader("Sec-WebSocket-Accept"), "s3pPLMBiTxaQ9kYGzzhZRbK+xOo=");
@@ -389,10 +391,12 @@ describe('ws', () => {
describe('WebSocketHandler', () => {
function connect() {
var rep = http.get("http://127.0.0.1:" + (8813 + base_port) + "/ws", {
"Upgrade": "websocket",
"Connection": "Upgrade",
"Sec-WebSocket-Key": "dGhlIHNhbXBsZSBub25jZQ==",
"Sec-WebSocket-Version": "13"
headers: {
"Upgrade": "websocket",
"Connection": "Upgrade",
"Sec-WebSocket-Key": "dGhlIHNhbXBsZSBub25jZQ==",
"Sec-WebSocket-Version": "13"
}
});
assert.equal(rep.firstHeader("Sec-WebSocket-Accept"), "s3pPLMBiTxaQ9kYGzzhZRbK+xOo=");

0 comments on commit c258ae4

Please sign in to comment.