Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
N
noVNC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rasky
noVNC
Commits
960752ea
Commit
960752ea
authored
Aug 19, 2014
by
samhed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes an error that was made in the merge with the last sync with websockify.
parent
9b731d3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
websock.js
include/websock.js
+9
-7
No files found.
include/websock.js
View file @
960752ea
...
@@ -262,7 +262,7 @@ function on(evt, handler) {
...
@@ -262,7 +262,7 @@ function on(evt, handler) {
eventHandlers
[
evt
]
=
handler
;
eventHandlers
[
evt
]
=
handler
;
}
}
function
init
(
protocols
)
{
function
init
(
protocols
,
ws_schema
)
{
rQ
=
[];
rQ
=
[];
rQi
=
0
;
rQi
=
0
;
sQ
=
[];
sQ
=
[];
...
@@ -277,12 +277,13 @@ function init(protocols) {
...
@@ -277,12 +277,13 @@ function init(protocols) {
(
'set'
in
Uint8Array
.
prototype
))
{
(
'set'
in
Uint8Array
.
prototype
))
{
bt
=
true
;
bt
=
true
;
}
}
// Check for full binary type support in WebSocket
//
Check for full binary type support in WebSockets
//
Inspired by:
//
TODO: this sucks, the property should exist on the prototype
//
https://github.com/Modernizr/Modernizr/issues/370
//
but it does not.
//
https://github.com/Modernizr/Modernizr/blob/master/feature-detects/websockets/binary.js
try
{
try
{
if
(
bt
&&
(
'binaryType'
in
(
new
WebSocket
(
"ws://localhost:17523"
))))
{
if
(
bt
&&
(
'binaryType'
in
WebSocket
.
prototype
||
!!
(
new
WebSocket
(
ws_schema
+
'://.'
).
binaryType
)))
{
Util
.
Info
(
"Detected binaryType support in WebSockets"
);
Util
.
Info
(
"Detected binaryType support in WebSockets"
);
wsbt
=
true
;
wsbt
=
true
;
}
}
...
@@ -325,7 +326,8 @@ function init(protocols) {
...
@@ -325,7 +326,8 @@ function init(protocols) {
}
}
function
open
(
uri
,
protocols
)
{
function
open
(
uri
,
protocols
)
{
protocols
=
init
(
protocols
);
var
ws_schema
=
uri
.
match
(
/^
([
a-z
]
+
)
:
\/\/
/
)[
1
];
protocols
=
init
(
protocols
,
ws_schema
);
if
(
test_mode
)
{
if
(
test_mode
)
{
websocket
=
{};
websocket
=
{};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment