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
afecb839
Commit
afecb839
authored
Sep 10, 2011
by
Joel Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pull websockify: python3 numpy buffer/string fix.
Pull from websockify 1c39c7f1f001.
parent
1150d0f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
websocket.py
utils/websocket.py
+2
-2
No files found.
utils/websocket.py
View file @
afecb839
...
@@ -295,7 +295,7 @@ Sec-WebSocket-Accept: %s\r
...
@@ -295,7 +295,7 @@ Sec-WebSocket-Accept: %s\r
if
has_mask
:
if
has_mask
:
# unmask payload
# unmask payload
f
[
'mask'
]
=
buf
[
f
[
'hlen'
]:
f
[
'hlen'
]
+
4
]
f
[
'mask'
]
=
buf
[
f
[
'hlen'
]:
f
[
'hlen'
]
+
4
]
b
=
c
=
''
b
=
c
=
s2b
(
''
)
if
f
[
'length'
]
>=
4
:
if
f
[
'length'
]
>=
4
:
mask
=
numpy
.
frombuffer
(
buf
,
dtype
=
numpy
.
dtype
(
'<u4'
),
mask
=
numpy
.
frombuffer
(
buf
,
dtype
=
numpy
.
dtype
(
'<u4'
),
offset
=
f
[
'hlen'
],
count
=
1
)
offset
=
f
[
'hlen'
],
count
=
1
)
...
@@ -635,7 +635,7 @@ Sec-WebSocket-Accept: %s\r
...
@@ -635,7 +635,7 @@ Sec-WebSocket-Accept: %s\r
# Generate the hash value for the accept header
# Generate the hash value for the accept header
accept
=
b64encode
(
sha1
(
s2b
(
key
+
self
.
GUID
))
.
digest
())
accept
=
b64encode
(
sha1
(
s2b
(
key
+
self
.
GUID
))
.
digest
())
response
=
self
.
server_handshake_hybi
%
accept
response
=
self
.
server_handshake_hybi
%
b2s
(
accept
)
if
self
.
base64
:
if
self
.
base64
:
response
+=
"Sec-WebSocket-Protocol: base64
\r\n
"
response
+=
"Sec-WebSocket-Protocol: base64
\r\n
"
else
:
else
:
...
...
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