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
c95c24e7
Commit
c95c24e7
authored
Aug 04, 2010
by
Joel Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #19: python2.4 support.
- Replace URL parsing using "".partition() with urlparse module.
parent
801482be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
websocket.py
utils/websocket.py
+4
-4
No files found.
utils/websocket.py
View file @
c95c24e7
...
...
@@ -15,6 +15,7 @@ import sys, socket, ssl, struct, traceback
import
os
,
resource
,
errno
,
signal
# daemonizing
from
base64
import
b64encode
,
b64decode
from
hashlib
import
md5
from
urlparse
import
urlsplit
,
parse_qsl
settings
=
{
'listen_host'
:
''
,
...
...
@@ -73,7 +74,7 @@ def parse_handshake(handshake):
ret
[
'path'
]
=
req_lines
[
0
]
.
split
(
" "
)[
1
]
for
line
in
req_lines
[
1
:]:
if
line
==
""
:
break
var
,
delim
,
val
=
line
.
partition
(
": "
)
var
,
val
=
line
.
split
(
": "
)
ret
[
var
]
=
val
if
req_lines
[
-
2
]
==
""
:
...
...
@@ -132,9 +133,8 @@ def do_handshake(sock):
h
=
parse_handshake
(
handshake
)
# Parse client settings from the GET path
cvars
=
h
[
'path'
]
.
partition
(
'?'
)[
2
]
.
partition
(
'#'
)[
0
]
.
split
(
'&'
)
for
cvar
in
[
c
for
c
in
cvars
if
c
]:
name
,
_
,
val
=
cvar
.
partition
(
'='
)
cvars
=
parse_qsl
(
urlsplit
(
h
[
'path'
])[
3
],
True
)
for
name
,
val
in
cvars
:
if
name
not
in
[
'b64encode'
]:
continue
value
=
val
and
val
or
True
client_settings
[
name
]
=
value
...
...
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