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);