From 8782de336af33b6886c459a6a059759ec9aca9ac Mon Sep 17 00:00:00 2001 From: Quinn Klassen Date: Tue, 3 Dec 2024 08:28:18 -0800 Subject: [PATCH] Make nexus header check case-insensitive (#2335) --- .../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);