aboutsummaryrefslogtreecommitdiff
path: root/modules/fediverse/ap_security.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-09-19 15:28:42 +0100
committerGravatar jesopo2019-09-19 15:28:58 +0100
commit8f382232845ae6eb166baf13c1b51883e2a57c18 (patch)
tree9af3731c22385f0a874d44a5e511dbd050af3f69 /modules/fediverse/ap_security.py
parentactually pass Request objects to utils.http.request_many() from rss.py (diff)
fedi http headers should be PascalCase
Diffstat (limited to 'modules/fediverse/ap_security.py')
-rw-r--r--modules/fediverse/ap_security.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/fediverse/ap_security.py b/modules/fediverse/ap_security.py
index 391c58de..f7d17a2e 100644
--- a/modules/fediverse/ap_security.py
+++ b/modules/fediverse/ap_security.py
@@ -23,9 +23,9 @@ class PrivateKey(object):
def signature(key: PrivateKey, headers: typing.List[typing.Tuple[str, str]]
) -> str:
- sign_header_keys = " ".join(h[0] for h in headers)
+ sign_header_keys = " ".join(h[0].lower() for h in headers)
- sign_string_parts = ["%s: %s" % (k, v) for k, v in headers]
+ sign_string_parts = ["%s: %s" % (k.lower(), v) for k, v in headers]
sign_string = "\n".join(sign_string_parts)
signature = key.key.sign(