mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Issue #26586: Merge excessive HTTP header handling from 3.5
This commit is contained in:
commit
b93e4b2480
3 changed files with 18 additions and 0 deletions
|
@ -338,6 +338,13 @@ class BaseHTTPRequestHandler(socketserver.StreamRequestHandler):
|
|||
HTTPStatus.BAD_REQUEST,
|
||||
"Line too long")
|
||||
return False
|
||||
except http.client.HTTPException as err:
|
||||
self.send_error(
|
||||
HTTPStatus.REQUEST_HEADER_FIELDS_TOO_LARGE,
|
||||
"Too many headers",
|
||||
str(err)
|
||||
)
|
||||
return False
|
||||
|
||||
conntype = self.headers.get('Connection', "")
|
||||
if conntype.lower() == 'close':
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue