From 5992d40da0e3c5eee4bd878f296120ab6f5a54c1 Mon Sep 17 00:00:00 2001 From: Quinn Klassen Date: Thu, 28 Nov 2024 10:16:21 -0800 Subject: [PATCH] Make nexus header check case-insensitive --- .../java/io/temporal/internal/nexus/NexusTaskHandlerImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/temporal-sdk/src/main/java/io/temporal/internal/nexus/NexusTaskHandlerImpl.java b/temporal-sdk/src/main/java/io/temporal/internal/nexus/NexusTaskHandlerImpl.java index 5ef69329c..98fa829b7 100644 --- a/temporal-sdk/src/main/java/io/temporal/internal/nexus/NexusTaskHandlerImpl.java +++ b/temporal-sdk/src/main/java/io/temporal/internal/nexus/NexusTaskHandlerImpl.java @@ -96,7 +96,9 @@ public Result handle(NexusTask task, Scope metricsScope) throws TimeoutException ScheduledFuture timeoutTask = null; AtomicBoolean timedOut = new AtomicBoolean(false); try { - String timeoutString = headers.get(Header.REQUEST_TIMEOUT); + // Parse request timeout, use the context headers to get the timeout + // since they are case-insensitive. + String timeoutString = ctx.getHeaders().get(Header.REQUEST_TIMEOUT); if (timeoutString != null) { try { Duration timeout = NexusUtil.parseRequestTimeout(timeoutString);