Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Client cookie properties are missing

Anyway, I just filed issue: https://github.com/eclipse/jetty.project/issues/4102

On Wed, Sep 18, 2019 at 4:28 PM John Jiang <john.sha.jiang@xxxxxxxxx> wrote:
Hi,
It looks Jetty server misses client cookie properties, like $Path, $Domain.

Please consider the below simple Servlet,
public class TestServlet extends HttpServlet {

    protected void doGet(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
        Cookie[] cookies = request.getCookies();
        if (cookies != null) {
            for (Cookie cookie : cookies) {
                System.out.printf(
                        "%s=%s; $Path=%s; $Domain=%s%n",
                        cookie.getName(),
                        cookie.getValue(),
                        cookie.getPath(),
                        cookie.getDomain());
            }
        }
    }
}

The path and domain are always null even though some client cookies set these properties.

In my testings, this problem raised on Jetty 9.4.20 and 10.0.0-alpha0, but NOT on Jetty 9.3.21.
Is it an known issue? Or, should I do something else on the latest Jetty releases.

Back to the top