@@ -11,7 +11,7 @@ var name = 'test'
11
11
var password = 'test123'
12
12
var options = {
13
13
extraHeaders : {
14
- Authorization : 'Basic ' + new Buffer ( name + ':' + password ) . toString ( 'base64' )
14
+ Authorization : 'Basic ' + new Buffer ( name + ':' + password ) . toString ( 'base64' )
15
15
}
16
16
}
17
17
@@ -21,7 +21,7 @@ describe('extraHeaders', function () {
21
21
testServer = ws . createServer ( function ( conn ) {
22
22
testConn = conn
23
23
} ) . listen ( TEST_PORT , function ( ) {
24
- testClient = ws . connect ( 'ws://localhost:' + TEST_PORT , options , done )
24
+ testClient = ws . connect ( 'ws://localhost:' + TEST_PORT , options , done )
25
25
} )
26
26
} )
27
27
@@ -32,26 +32,26 @@ describe('extraHeaders', function () {
32
32
33
33
it ( 'should create a headerString with extra header options' , function ( done ) {
34
34
var client = getClient ( ) ,
35
- string = 'GET ' + client . path + ' HTTP/1.1\r\nHost: ' + client . host + '\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Key: ' + client . key + '\r\nSec-WebSocket-Version: 13\r\nAuthorization: Basic ' + new Buffer ( name + ':' + password ) . toString ( 'base64' ) + '\r\n\r\n'
35
+ string = 'GET ' + client . path + ' HTTP/1.1\r\nHost: ' + client . host + '\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Key: ' + client . key + '\r\nSec-WebSocket-Version: 13\r\nAuthorization: Basic ' + new Buffer ( name + ':' + password ) . toString ( 'base64' ) + '\r\n\r\n'
36
36
37
37
var headers = {
38
- '' : 'GET ' + client . path + ' HTTP/1.1' ,
38
+ '' : 'GET ' + client . path + ' HTTP/1.1' ,
39
39
'Host' : client . host ,
40
- 'Upgrade' : 'websocket' ,
40
+ 'Upgrade' : 'websocket' ,
41
41
'Connection' : 'Upgrade' ,
42
- 'Sec-WebSocket-Key' : client . key ,
43
- 'Sec-WebSocket-Version' : '13'
42
+ 'Sec-WebSocket-Key' : client . key ,
43
+ 'Sec-WebSocket-Version' : '13'
44
44
}
45
45
46
- headers . Authorization = 'Basic ' + new Buffer ( name + ':' + password ) . toString ( 'base64' )
46
+ headers . Authorization = 'Basic ' + new Buffer ( name + ':' + password ) . toString ( 'base64' )
47
47
48
48
var buildstring = client . buildHeaders ( headers )
49
49
50
50
if ( string === buildstring ) {
51
51
done ( )
52
52
}
53
-
54
- } )
53
+
54
+ } )
55
55
} )
56
56
57
57
describe ( 'text frames' , function ( ) {
0 commit comments