aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-10-04 19:41:14 +0300
committerGravatar Vitaly Takmazov2018-10-04 19:41:14 +0300
commit3a9dc0eb9d633c1ec068772ed1cd7e53b44c452a (patch)
tree74417cec76264fa209a7315184bb1cf0a6173147 /juick-server/src/main/java/com/juick
parent0cb00c61bd1ab203c66878d3c313b6f40b4cc707 (diff)
HTTP Signatures: add Accept-Encoding
Diffstat (limited to 'juick-server/src/main/java/com/juick')
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/Profile.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java
index 5a269d03..115ca89a 100644
--- a/juick-server/src/main/java/com/juick/server/api/activity/Profile.java
+++ b/juick-server/src/main/java/com/juick/server/api/activity/Profile.java
@@ -235,6 +235,7 @@ public class Profile {
@RequestHeader(name = "Digest", required = false) String digest,
@RequestHeader(name = "Content-Type") String contentType,
@RequestHeader(name = "User-Agent", required = false) String userAgent,
+ @RequestHeader(name = "Accept-Encoding", required = false) String acceptEncoding,
@RequestHeader(name = "Signature", required = false) String signature) {
UriComponents componentsBuilder = ServletUriComponentsBuilder.fromCurrentRequestUri().build();
Map<String, String> headers = new HashMap<>();
@@ -243,6 +244,7 @@ public class Profile {
headers.put("digest", digest);
headers.put("content-type", contentType);
headers.put("user-agent", userAgent);
+ headers.put("accept-encoding", acceptEncoding);
boolean valid = signatureManager.verifySignature(signature, URI.create(activity.getActor()), "POST",
componentsBuilder.getPath(), headers);
if (valid) {