aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-10-05 10:25:18 +0300
committerGravatar Vitaly Takmazov2018-10-05 10:25:18 +0300
commit07ac8017afa883f0fb3748a02bc1236882bfd06c (patch)
tree124e20b5d5d31d8f1d8bcecba6813b732f9e4f3c /juick-server/src/main/java/com/juick
parent887bd23dc34749cee0eced8ec06cb11deb486c0c (diff)
fix 2 tests
Diffstat (limited to 'juick-server/src/main/java/com/juick')
-rw-r--r--juick-server/src/main/java/com/juick/server/SignatureManager.java2
-rw-r--r--juick-server/src/main/java/com/juick/server/api/activity/Profile.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/juick-server/src/main/java/com/juick/server/SignatureManager.java b/juick-server/src/main/java/com/juick/server/SignatureManager.java
index 2361a65b..c39cdac9 100644
--- a/juick-server/src/main/java/com/juick/server/SignatureManager.java
+++ b/juick-server/src/main/java/com/juick/server/SignatureManager.java
@@ -78,7 +78,7 @@ public class SignatureManager {
logger.info("person not found");
return false;
}
- Optional<Context> getContext(URI contextUri) {
+ public Optional<Context> getContext(URI contextUri) {
try {
return Optional.of(new RestTemplate().getForEntity(contextUri, Context.class).getBody());
} catch (HttpClientErrorException e) {
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 146e78f0..a21601db 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
@@ -245,7 +245,7 @@ public class Profile {
@RequestHeader(name = "Signature", required = false) String signature) throws JsonProcessingException {
UriComponents componentsBuilder = ServletUriComponentsBuilder.fromCurrentRequestUri().build();
Map<String, String> headers = new HashMap<>();
- headers.put("host", host);
+ headers.put("host", host.split(":", 2)[0]);
headers.put("date", date);
headers.put("digest", digest);
headers.put("content-type", contentType);