You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2026/05/21 14:26:46 UTC

(tomcat) branch 11.0.x updated: Fix backport of NPE fixes

This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
     new 2cd0d8f881 Fix backport of NPE fixes
2cd0d8f881 is described below

commit 2cd0d8f881c4e8b816ff04c0781402e7d9561abe
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Thu May 21 15:26:22 2026 +0100

    Fix backport of NPE fixes
---
 java/org/apache/catalina/core/AsyncContextImpl.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java/org/apache/catalina/core/AsyncContextImpl.java b/java/org/apache/catalina/core/AsyncContextImpl.java
index b9154e90d9..2246145e29 100644
--- a/java/org/apache/catalina/core/AsyncContextImpl.java
+++ b/java/org/apache/catalina/core/AsyncContextImpl.java
@@ -194,7 +194,7 @@ public class AsyncContextImpl implements AsyncContext, AsyncContextCallback {
             path = path.substring(cpath.length());
         }
         Context context = this.context;
-        if (context == null || context.getDispatchersUseEncodedPaths()) {
+        if (context != null && !context.getDispatchersUseEncodedPaths()) {
             path = UDecoder.URLDecode(path, StandardCharsets.UTF_8);
         }
         dispatch(path);


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: (tomcat) branch 11.0.x updated: Fix backport of NPE fixes

Posted by Rémy Maucherat <re...@apache.org>.
On Thu, May 21, 2026 at 4:26 PM <ma...@apache.org> wrote:
>
> This is an automated email from the ASF dual-hosted git repository.
>
> markt-asf pushed a commit to branch 11.0.x
> in repository https://gitbox.apache.org/repos/asf/tomcat.git
>
>
> The following commit(s) were added to refs/heads/11.0.x by this push:
>      new 2cd0d8f881 Fix backport of NPE fixes
> 2cd0d8f881 is described below
>
> commit 2cd0d8f881c4e8b816ff04c0781402e7d9561abe
> Author: Mark Thomas <ma...@apache.org>
> AuthorDate: Thu May 21 15:26:22 2026 +0100
>
>     Fix backport of NPE fixes

That merge was actually far more trickier than it looked.

Rémy

> ---
>  java/org/apache/catalina/core/AsyncContextImpl.java | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/java/org/apache/catalina/core/AsyncContextImpl.java b/java/org/apache/catalina/core/AsyncContextImpl.java
> index b9154e90d9..2246145e29 100644
> --- a/java/org/apache/catalina/core/AsyncContextImpl.java
> +++ b/java/org/apache/catalina/core/AsyncContextImpl.java
> @@ -194,7 +194,7 @@ public class AsyncContextImpl implements AsyncContext, AsyncContextCallback {
>              path = path.substring(cpath.length());
>          }
>          Context context = this.context;
> -        if (context == null || context.getDispatchersUseEncodedPaths()) {
> +        if (context != null && !context.getDispatchersUseEncodedPaths()) {
>              path = UDecoder.URLDecode(path, StandardCharsets.UTF_8);
>          }
>          dispatch(path);
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org