Making the incoming headers case insensitive. Any reference to incoming headers should now be made with lowercase.
This commit is contained in:
parent
4c0f211dac
commit
4787641c7b
@ -180,10 +180,10 @@ class AjaxClient:
|
||||
headers = {}
|
||||
for line in parts[0].split(makeBytes('\r\n')):
|
||||
pair = line.split(makeBytes(': '))
|
||||
headers[pair[0]] = pair[1] if len(pair) > 1 else None
|
||||
headers[pair[0].lower()] = pair[1] if len(pair) > 1 else None
|
||||
|
||||
headerLength = len(parts[0]) + 4
|
||||
bodyLength = int(headers.get(makeBytes('Content-Length'), 0))
|
||||
bodyLength = int(headers.get(makeBytes('content-length'), 0))
|
||||
totalLength = headerLength + bodyLength
|
||||
|
||||
if totalLength > len(data):
|
||||
|
Loading…
Reference in New Issue
Block a user