diff options
Diffstat (limited to 'waitress/task.py')
-rw-r--r-- | waitress/task.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/waitress/task.py b/waitress/task.py index 9ddb1ad..8cefce4 100644 --- a/waitress/task.py +++ b/waitress/task.py @@ -350,7 +350,10 @@ class WSGITask(Task): raise ValueError( 'Header value %r is not a string in %s' % (v, (k, v)) ) - if k == 'Content-Length': + if k in ('content-length', 'Content-Length', 'Content-length', + 'CONTENT-LENGTH'): + # reduce funccalls by not calling .lower at small risk of + # being wrong self.content_length = int(v) self.response_headers.extend(headers) |