From 8fa1920e79e3878a0f5eeba20b83df80dcd4abb4 Mon Sep 17 00:00:00 2001 From: alexanderkurash Date: Wed, 28 Aug 2024 19:33:45 +0300 Subject: [PATCH 1/2] RRT issue - add logging --- .../org/folio/circulation/support/http/server/WebContext.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/folio/circulation/support/http/server/WebContext.java b/src/main/java/org/folio/circulation/support/http/server/WebContext.java index a38173b438..0686c87370 100644 --- a/src/main/java/org/folio/circulation/support/http/server/WebContext.java +++ b/src/main/java/org/folio/circulation/support/http/server/WebContext.java @@ -18,7 +18,9 @@ import io.vertx.core.http.HttpClient; import io.vertx.ext.web.RoutingContext; +import lombok.extern.log4j.Log4j2; +@Log4j2 public class WebContext { private final RoutingContext routingContext; @@ -100,6 +102,7 @@ public void writeResultToHttpResponse(Result result) { public Map getHeaders() { return routingContext.request().headers().entries().stream() + .peek(entry -> log.info(String.format("%s %s", entry.getKey(), entry.getValue()))) .collect(toMap(entry -> entry.getKey().toLowerCase(), Map.Entry::getValue)); } } From dcf5f46b542cd3c81684ecefd74424ea0214a448 Mon Sep 17 00:00:00 2001 From: alexanderkurash Date: Thu, 29 Aug 2024 15:16:23 +0300 Subject: [PATCH 2/2] Potential fix --- .../org/folio/circulation/support/http/server/WebContext.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/folio/circulation/support/http/server/WebContext.java b/src/main/java/org/folio/circulation/support/http/server/WebContext.java index 0686c87370..427fc4bcda 100644 --- a/src/main/java/org/folio/circulation/support/http/server/WebContext.java +++ b/src/main/java/org/folio/circulation/support/http/server/WebContext.java @@ -103,6 +103,7 @@ public void writeResultToHttpResponse(Result result) { public Map getHeaders() { return routingContext.request().headers().entries().stream() .peek(entry -> log.info(String.format("%s %s", entry.getKey(), entry.getValue()))) - .collect(toMap(entry -> entry.getKey().toLowerCase(), Map.Entry::getValue)); + .collect(toMap(entry -> entry.getKey().toLowerCase(), Map.Entry::getValue, + (val1, val2) -> val1)); } }