mirror of https://github.com/python/cpython
tighten up except - only ValueError can be raised in this situation
This commit is contained in:
parent
3c643d8db3
commit
db5d1444a1
|
@ -506,7 +506,7 @@ class FieldStorage:
|
||||||
if self.headers.has_key('content-length'):
|
if self.headers.has_key('content-length'):
|
||||||
try:
|
try:
|
||||||
clen = int(self.headers['content-length'])
|
clen = int(self.headers['content-length'])
|
||||||
except:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
if maxlen and clen > maxlen:
|
if maxlen and clen > maxlen:
|
||||||
raise ValueError, 'Maximum content length exceeded'
|
raise ValueError, 'Maximum content length exceeded'
|
||||||
|
|
Loading…
Reference in New Issue