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

jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/main by this push:
     new 6e404756ad Remove deprecated Cookie calls in ProxyServlet (#2851)
6e404756ad is described below

commit 6e404756ada0b6fd3cfc867599ca7fe5dea13156
Author: Holger Friedrich <[email protected]>
AuthorDate: Tue Sep 8 18:20:50 2026 +0200

    Remove deprecated Cookie calls in ProxyServlet (#2851)
    
    Cookie.setComment(String) and Cookie.setVersion(int) are deprecated for
    removal in Jakarta Servlet 6.1 and specified as no-ops: setComment is
    ignored and getComment() returns null, setVersion is ignored and
    getVersion() returns 0.
---
 .../java/org/apache/karaf/http/core/internal/proxy/ProxyServlet.java    | 2 --
 1 file changed, 2 deletions(-)

diff --git 
a/http/src/main/java/org/apache/karaf/http/core/internal/proxy/ProxyServlet.java
 
b/http/src/main/java/org/apache/karaf/http/core/internal/proxy/ProxyServlet.java
index 8d7c8841cc..c005708dc2 100644
--- 
a/http/src/main/java/org/apache/karaf/http/core/internal/proxy/ProxyServlet.java
+++ 
b/http/src/main/java/org/apache/karaf/http/core/internal/proxy/ProxyServlet.java
@@ -326,12 +326,10 @@ public class ProxyServlet extends HttpServlet {
             //set cookie name prefixed w/ a proxy value so it won't collide w/ 
other cookies
             String proxyCookieName = getCookieNamePrefix() + cookie.getName();
             Cookie servletCookie = new Cookie(proxyCookieName, 
cookie.getValue());
-            servletCookie.setComment(cookie.getComment());
             servletCookie.setMaxAge((int) cookie.getMaxAge());
             servletCookie.setPath(path); //set to the path of the proxy servlet
             // don't set cookie domain
             servletCookie.setSecure(cookie.getSecure());
-            servletCookie.setVersion(cookie.getVersion());
             servletResponse.addCookie(servletCookie);
         }
     }

Reply via email to