Ticket #221 (new defect)
IOError not handled in request
| Reported by: | dalius | Owned by: | ianb |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.4.1 |
| Component: | paste | Version: | svn-trunk |
| Severity: | normal | Keywords: | |
| Cc: |
Description
It is rather rare error but I believe it must be handled in paster side instead of being propagated. Actually this error is some kind of attack on server most probably (but python fails nicely here). However I don't know what exactly solution would fit here best.
Module paste.wsgiwrappers:213 in POST
<< ``charset`` is set.
"""
params = self._POST()
if self.charset:
params = UnicodeMultiDict(params, encoding=self.charset,>> params = self._POST()
Module paste.wsgiwrappers:195 in _POST
<<
def _POST(self):
return parse_formvars(self.environ, include_get_vars=False)
def POST(self):>> return parse_formvars(self.environ, include_get_vars=False)
Module paste.request:174 in parse_formvars
<< fs = cgi.FieldStorage(fp=input,
environ=environ,
keep_blank_values=1)
environ['QUERY_STRING'] = old_query_string
if fake_out_cgi:>> keep_blank_values=1)
Module cgi:528 in __init__
<< self.done = 0
if ctype == 'application/x-www-form-urlencoded':
self.read_urlencoded()
elif ctype[:10] == 'multipart/':
self.read_multi(environ, keep_blank_values, strict_parsing)>> self.read_urlencoded()
Module cgi:633 in read_urlencoded
<< def read_urlencoded(self):
"""Internal: read data in query string format."""
qs = self.fp.read(self.length)
self.list = list = []
for key, value in parse_qsl(qs, self.keep_blank_values,>> qs = self.fp.read(self.length)
IOError: request data read error
Some CGI variables from this request:
CONTENT_LENGTH '1599' CONTENT_TYPE 'application/x-www-form-urlencoded' DOCUMENT_ROOT '/htdocs' GATEWAY_INTERFACE 'CGI/1.1' HTTP_ACCEPT '*/*' HTTP_EXPECT '100-continue' HTTP_PRAGMA 'no-cache' HTTP_PROXY_CONNECTION 'Keep-Alive' HTTP_USER_AGENT 'User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322; .NET CLR 2.0.50727; InfoPath?.2)' PATH '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11' PATH_INFO '/review/addcomment/289' REMOTE_ADDR '210.26.49.194' REMOTE_PORT '2449' REQUEST_METHOD 'POST' REQUEST_URI '/review/addcomment/289' SERVER_PORT '80' SERVER_PROTOCOL 'HTTP/1.1' SERVER_SOFTWARE 'Apache/2.2.3 (Debian) mod_wsgi/1.2 Python/2.4.4'
