Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jetty 12 - Use oej.http.HttpCookie in jetty-client #9288

Closed
sbordet opened this issue Feb 2, 2023 · 1 comment · Fixed by #9289
Closed

Jetty 12 - Use oej.http.HttpCookie in jetty-client #9288

sbordet opened this issue Feb 2, 2023 · 1 comment · Fixed by #9289
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@sbordet
Copy link
Contributor

sbordet commented Feb 2, 2023

Jetty version(s)
12+

Description
Module jetty-client relies on java.net.HttpCookie and related classes, but they are a little outdated (for example, no support for SameSite) and with glitches (for example, cookie names are treated case-insensitively, but the RFC implies they are case-sensitive).

Furthermore, they are awkward to use, since they have to go through java.net.CookieManager and the default implementation of java.net.CookieStore is not particularly efficient.

At least the API usage in jetty-client should use org.eclipse.jetty.http.HttpCookie, and a Jetty cookie store implementation.

@sbordet sbordet added the Bug For general bugs on Jetty side label Feb 2, 2023
@sbordet sbordet self-assigned this Feb 2, 2023
sbordet added a commit that referenced this issue Feb 2, 2023
* Replaced usages of java.net.HttpCookie with oej.http.HttpCookie.
* Moved server-side only methods from HttpCookie to HttpCookieUtils.
* Introduced and implemented oej.http.HttpCookieStore.
* Removed now obsolete oej.util.HttpCookieStore.

Signed-off-by: Simone Bordet <[email protected]>
sbordet added a commit that referenced this issue Feb 2, 2023
* Replaced usages of java.net.HttpCookie with oej.http.HttpCookie.
* Moved server-side only methods from HttpCookie to HttpCookieUtils.
* Introduced and implemented oej.http.HttpCookieStore.
* Removed now obsolete oej.util.HttpCookieStore.

Signed-off-by: Simone Bordet <[email protected]>
sbordet added a commit that referenced this issue Feb 4, 2023
* Replaced usages of java.net.HttpCookie with oej.http.HttpCookie.
* Moved server-side only methods from HttpCookie to HttpCookieUtils.
* Introduced and implemented oej.http.HttpCookieStore.
* Removed now obsolete oej.util.HttpCookieStore.

Signed-off-by: Simone Bordet <[email protected]>
sbordet added a commit that referenced this issue Feb 6, 2023
* Replaced usages of java.net.HttpCookie with oej.http.HttpCookie.
* Moved server-side only methods from HttpCookie to HttpCookieUtils.
* Introduced and implemented oej.http.HttpCookieStore.
* Removed now obsolete oej.util.HttpCookieStore.

Signed-off-by: Simone Bordet <[email protected]>
sbordet added a commit that referenced this issue Feb 7, 2023
)

* Replaced usages of java.net.HttpCookie with oej.http.HttpCookie.
* Moved server-side only methods from HttpCookie to HttpCookieUtils.
* Introduced and implemented oej.http.HttpCookieStore.
* Removed now obsolete oej.util.HttpCookieStore.
* Introduced HttpScheme.isSecure(String), to avoid code duplication.
* Fixed handling of cookie "localhost" domain in HttpClient.

Signed-off-by: Simone Bordet <[email protected]>
@sbordet
Copy link
Contributor Author

sbordet commented Feb 7, 2023

Fixed by #9289.

@sbordet sbordet closed this as completed Feb 7, 2023
gregpoulos pushed a commit to gregpoulos/jetty.project that referenced this issue Feb 7, 2023
…x-documentation-operations-logging

* upstream/jetty-12.0.x:
  Jetty 12: Cleanup `StatisticsHandler` (jetty#9291)
  Fixes jetty#9288 - Jetty 12 - Use oej.http.HttpCookie in jetty-client. (jetty#9289)
  Redo Handler renaming (jetty#9318)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant