Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1476

Expires attribute for NewCookie is not set correctly in response header

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.1.0.Beta2, 3.0.20.Final
    • 3.0.19.Final
    • jaxrs
    • None

      When the Cookie set Expires attribute but it's not same to a specified time:

          @GET
          @Path("get0")
          public Response get0() {
              System.out.println("MyEndpoint get0");
              NewCookie cookie = new NewCookie("Name", "Value", "/", "*", 0,
      "comment", 3600, new Date(),
                      true, true);
              return
      Response.ok().cookie(cookie).entity(cookie.toString()).build();
          }
      

      It looks "Set-cookie" header Expires is always calculated from Max-Age attribute.

              rhn-engineering-ema Jim Ma
              rhn-engineering-ema Jim Ma
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: