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
7dfa20b8
Commit
7dfa20b8
authored
Jun 24, 2010
by
Joel Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove invalid pos check from web-socket-js.
parent
094b489b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
13 deletions
+12
-13
WebSocket.as
include/web-socket-js/flash-src/WebSocket.as
+12
-13
No files found.
include/web-socket-js/flash-src/WebSocket.as
View file @
7dfa20b8
...
@@ -187,6 +187,7 @@ public class WebSocket extends EventDispatcher {
...
@@ -187,6 +187,7 @@ public class WebSocket extends EventDispatcher {
main
.
log
(
"request header:\n"
+
req
)
;
main
.
log
(
"request header:\n"
+
req
)
;
socket
.
writeUTFBytes
(
req
)
;
socket
.
writeUTFBytes
(
req
)
;
main
.
log
(
"sent key3: "
+
key3
)
;
main
.
log
(
"sent key3: "
+
key3
)
;
main
.
log
(
"expected digest: "
+
expectedDigest
)
;
writeBytes
(
key3
)
;
writeBytes
(
key3
)
;
socket
.
flush
()
;
socket
.
flush
()
;
}
}
...
@@ -250,20 +251,18 @@ public class WebSocket extends EventDispatcher {
...
@@ -250,20 +251,18 @@ public class WebSocket extends EventDispatcher {
pos
=
-1
;
pos
=
-1
;
}
}
}
else
if
(
headerState
==
4
)
{
}
else
if
(
headerState
==
4
)
{
if
(
pos
==
15
)
{
var
replyDigest
:
String
=
readBytes
(
buffer
,
16
)
;
var
replyDigest
:
String
=
readBytes
(
buffer
,
16
)
;
main
.
log
(
"reply digest: "
+
replyDigest
)
;
main
.
log
(
"reply digest: "
+
replyDigest
)
;
if
(
replyDigest
!=
expectedDigest
)
{
if
(
replyDigest
!=
expectedDigest
)
{
onError
(
"digest doesn't match: "
+
replyDigest
+
" != "
+
expectedDigest
)
;
onError
(
"digest doesn't match: "
+
replyDigest
+
" != "
+
expectedDigest
)
;
return
;
return
;
}
headerState
=
5
;
makeBufferCompact
()
;
pos
=
-1
;
readyState
=
OPEN
;
notifyStateChange
()
;
dispatchEvent
(
new
Event
(
"open"
))
;
}
}
headerState
=
5
;
makeBufferCompact
()
;
pos
=
-1
;
readyState
=
OPEN
;
notifyStateChange
()
;
dispatchEvent
(
new
Event
(
"open"
))
;
}
else
{
}
else
{
if
(
buffer
[
pos
]
==
0xff
)
{
if
(
buffer
[
pos
]
==
0xff
)
{
//if (buffer.bytesAvailable > 1) {
//if (buffer.bytesAvailable > 1) {
...
...
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