From 07ac8017afa883f0fb3748a02bc1236882bfd06c Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 5 Oct 2018 10:25:18 +0300 Subject: fix 2 tests --- juick-server/src/main/java/com/juick/server/SignatureManager.java | 2 +- juick-server/src/main/java/com/juick/server/api/activity/Profile.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'juick-server/src/main/java/com/juick') 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 getContext(URI contextUri) { + public Optional 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 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); -- cgit v1.2.3