mirror of
https://github.com/jointakahe/takahe.git
synced 2025-06-05 10:18:50 +00:00
Allow signing content-length header
This commit is contained in:
parent
9e2092c4b2
commit
5ba9ed6428
1 changed files with 2 additions and 0 deletions
|
@ -87,6 +87,8 @@ class HttpSignature:
|
||||||
value = f"{request.method.lower()} {request.path}"
|
value = f"{request.method.lower()} {request.path}"
|
||||||
elif header_name == "content-type":
|
elif header_name == "content-type":
|
||||||
value = request.META["CONTENT_TYPE"]
|
value = request.META["CONTENT_TYPE"]
|
||||||
|
elif header_name == "content-length":
|
||||||
|
value = request.META["CONTENT_LENGTH"]
|
||||||
else:
|
else:
|
||||||
value = request.META["HTTP_%s" % header_name.upper().replace("-", "_")]
|
value = request.META["HTTP_%s" % header_name.upper().replace("-", "_")]
|
||||||
headers[header_name] = value
|
headers[header_name] = value
|
||||||
|
|
Loading…
Reference in a new issue