CHecking the string length of content length

merge-requests/30/head
Bob Mottram 2022-09-08 12:14:39 +01:00
parent 0baec75b68
commit 85c4ec0c1f
1 changed files with 2 additions and 2 deletions

View File

@ -20446,9 +20446,9 @@ class PubServer(BaseHTTPRequestHandler):
# check that the content length string is not too long
if isinstance(self.headers['Content-length'], str):
if not is_media_content:
max_content_size = self.server.maxMessageLength
max_content_size = len(str(self.server.maxMessageLength))
else:
max_content_size = self.server.maxMediaSize
max_content_size = len(str(self.server.maxMediaSize))
if len(self.headers['Content-length']) > max_content_size:
self._400()
self.server.postreq_busy = False