You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2025/04/02 06:07:00 UTC
[jira] [Updated] (FELIX-6756) Cookie name "Path" is a reserved token
[ https://issues.apache.org/jira/browse/FELIX-6756?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carsten Ziegeler updated FELIX-6756:
------------------------------------
Affects Version/s: http.jetty12-1.0.22
http.jetty-5.1.28
> Cookie name "Path" is a reserved token
> --------------------------------------
>
> Key: FELIX-6756
> URL: https://issues.apache.org/jira/browse/FELIX-6756
> Project: Felix
> Issue Type: Bug
> Components: HTTP Service
> Affects Versions: http.wrappers-1.0.6, http.wrappers-1.1.8, http.jetty-5.1.28, http.jetty12-1.0.22
> Reporter: Rob Li
> Assignee: Paul Rütter
> Priority: Blocker
> Fix For: http.wrappers-1.0.8, http.wrappers-1.1.10, http.jetty12-1.0.24, http.jetty-5.1.30
>
> Attachments: changes.diff
>
>
> Hi Gurus,
> we tried migrating our felix application to using tomcat 10, had to wrap our org.apache.felix.http.proxy.ProxyServlet implementation with the httpwrappers:
> {code:java}
> final ProxyServlet instance = new ProxyServlet();
> try {
> instance.init(new javax.servlet.ServletConfig() {
> @Override
> public String getInitParameter(final String name) {
> return filterConfig.getInitParameter(name);
> }
> @Override
> public Enumeration getInitParameterNames() {
> return filterConfig.getInitParameterNames();
> }
> @Override
> public javax.servlet.ServletContext getServletContext() {
> return new ServletContextWrapper(filterConfig.getServletContext());
> }
> @Override
> public String getServletName() {
> return filterConfig.getFilterName();
> }
> });
> } catch (javax.servlet.ServletException exception) {
> throw new ServletExceptionWrapper(exception);
> }
> this.servlet = new ServletWrapper(instance); {code}
> Then I am seeing this error:
> {noformat}
> java.lang.IllegalArgumentException: Cookie name "Path" is a reserved token
> at javax.servlet.http.Cookie.<init>(Cookie.java:192)
> at org.apache.felix.http.javaxwrappers.CookieWrapper.<init>(CookieWrapper.java:53)
> at org.apache.felix.http.javaxwrappers.CookieWrapper.wrap(CookieWrapper.java:41)
> at org.apache.felix.http.javaxwrappers.HttpServletRequestWrapper.getCookies(HttpServletRequestWrapper.java:59)
> at javax.servlet.http.HttpServletRequestWrapper.getCookies(HttpServletRequestWrapper.java:110)
> at javax.servlet.http.HttpServletRequestWrapper.getCookies(HttpServletRequestWrapper.java:110)
> at org.apache.felix.http.jakartawrappers.HttpServletRequestWrapper.getCookies(HttpServletRequestWrapper.java:63)
> at jakarta.servlet.http.HttpServletRequestWrapper.getCookies(HttpServletRequestWrapper.java:66)
> at jakarta.servlet.http.HttpServletRequestWrapper.getCookies(HttpServletRequestWrapper.java:66){noformat}
> could you please take a look? Attached please fine the diff that fixed the issue.
> Appreicate your help!
> Rob
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)