Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
wspy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Taddeüs Kroes
wspy
Commits
0db7d5e6
Commit
0db7d5e6
authored
Dec 18, 2014
by
Taddeüs Kroes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increased max header length and added error rather than silent fail
parent
99d2cfc0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
handshake.py
handshake.py
+6
-2
No files found.
handshake.py
View file @
0db7d5e6
...
...
@@ -15,7 +15,7 @@ WS_GUID = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'
WS_VERSION
=
'13'
MAX_REDIRECTS
=
10
HDR_TIMEOUT
=
5
MAX_HDR_LEN
=
512
MAX_HDR_LEN
=
1024
class
Handshake
(
object
):
...
...
@@ -65,7 +65,11 @@ class Handshake(object):
start_time
=
time
.
time
()
while
hdr
[
-
4
:]
!=
'
\
r
\
n
\
r
\
n
'
and
len
(
hdr
)
<
MAX_HDR_LEN
:
while
hdr
[
-
4
:]
!=
'
\
r
\
n
\
r
\
n
'
:
if
len
(
hdr
)
==
MAX_HDR_LEN
:
raise
HandshakeError
(
'request exceeds maximum header '
'length of %d'
%
MAX_HDR_LEN
)
hdr
+=
self
.
sock
.
recv
(
1
)
time_diff
=
time
.
time
()
-
start_time
...
...
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