`HttpCookieUtils` ignores `expires` attribute
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 4.1k
- Forks
- 2k
- Avg merge
- 3d 56m
- Merged PRs (30d)
- 48
Description
Jetty version(s)
12.1.12
Jetty Environment
core
HTTP version
2
Java version/vendor
Java 26, Eclipse Adoptium
OS type/version
Ubuntu 24.04.4 LTS
Description
In HttpCookieUtils, both getRFC2965SetCookie and getRFC6265SetCookie ignore the expires attribute from the passed HttpCookie httpCookie parameter.
How to reproduce?
- Add a cookie, e.g.
Response.addCookie(response, HttpCookie.build("name", "value").expires(Instant.now()).path("/").build()); HttpCookieUtilsgenerates a header value ofname=value; Path=/
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with HttpCookieUtils, specifically getRFC2965SetCookie and getRFC6265SetCookie, then trace the cookie created through Response.addCookie. Reproduce the example with an expires value and inspect the generated header. Done means both header-generation paths preserve the expires attribute, with tests covering the resulting header values.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100