Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
714e8d3a
Commit
714e8d3a
authored
Oct 26, 2011
by
Ralf Schmitt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
raise IOError on truncated POST requests
fixes
http://code.google.com/p/gevent/issues/detail?id=92
parent
4f5e54d1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
gevent/pywsgi.py
gevent/pywsgi.py
+9
-1
No files found.
gevent/pywsgi.py
View file @
714e8d3a
...
...
@@ -83,6 +83,10 @@ class Input(object):
return
''
read
=
reader
(
length
)
self
.
position
+=
len
(
read
)
if
len
(
read
)
<
length
:
if
(
use_readline
and
not
read
.
endswith
(
"
\
n
"
))
or
not
use_readline
:
raise
IOError
(
"unexpected end of file while reading request at position %s"
%
(
self
.
position
,))
return
read
def
_chunked_read
(
self
,
length
=
None
,
use_readline
=
False
):
...
...
@@ -126,7 +130,11 @@ class Input(object):
if
use_readline
and
data
[
-
1
]
==
"
\
n
"
:
break
else
:
self
.
chunk_length
=
int
(
rfile
.
readline
().
split
(
";"
,
1
)[
0
],
16
)
line
=
rfile
.
readline
()
if
not
line
.
endswith
(
"
\
n
"
):
self
.
chunk_length
=
0
raise
IOError
(
"unexpected end of file while reading chunked data header"
)
self
.
chunk_length
=
int
(
line
.
split
(
";"
,
1
)[
0
],
16
)
self
.
position
=
0
if
self
.
chunk_length
==
0
:
rfile
.
readline
()
...
...
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