Use case insensitive comparisons for HTTP headers (#33)

This commit is contained in:
Steve Li
2022-01-31 23:10:23 +11:00
committed by GitHub
parent c130d8f2d4
commit e16fb94b2d
2 changed files with 6 additions and 5 deletions

View File

@@ -51,7 +51,7 @@ class Request(BaseRequest):
header, value = line.split(':', 1)
value = value.strip()
headers[header] = value
if header == 'Content-Length':
if header.lower() == 'content-length':
content_length = int(value)
# body