Allow signing content-length header

This commit is contained in:
Andrew Godwin 2022-12-18 16:12:57 -07:00
parent 9e2092c4b2
commit 5ba9ed6428
1 changed files with 2 additions and 0 deletions

View File

@ -87,6 +87,8 @@ class HttpSignature:
value = f"{request.method.lower()} {request.path}"
elif header_name == "content-type":
value = request.META["CONTENT_TYPE"]
elif header_name == "content-length":
value = request.META["CONTENT_LENGTH"]
else:
value = request.META["HTTP_%s" % header_name.upper().replace("-", "_")]
headers[header_name] = value