mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
tighten up except - only ValueError can be raised in this situation
This commit is contained in:
parent
3c643d8db3
commit
db5d1444a1
1 changed files with 1 additions and 1 deletions
|
@ -506,7 +506,7 @@ class FieldStorage:
|
|||
if self.headers.has_key('content-length'):
|
||||
try:
|
||||
clen = int(self.headers['content-length'])
|
||||
except:
|
||||
except ValueError:
|
||||
pass
|
||||
if maxlen and clen > maxlen:
|
||||
raise ValueError, 'Maximum content length exceeded'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue