Fix issues with CookieCompliance on Jetty 9.4 HttpConnector mode.#418
Fix issues with CookieCompliance on Jetty 9.4 HttpConnector mode.#418lachlan-roberts wants to merge 5 commits intomainfrom
Conversation
Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
Summary of ChangesHello @lachlan-roberts, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a specific configuration oversight in Jetty 9.4 where cookie and multipart form data compliance settings were not correctly applied under certain legacy and HTTP connector usage scenarios. The changes ensure that the system adheres to the appropriate RFC2965 standard for cookies and legacy compliance for multipart forms. A significant part of this update also involves enhancing the test suite by parameterizing the cookie compliance tests, making them more robust and capable of validating behavior across a broader range of runtime environments. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request addresses an issue with cookie compliance in Jetty 9.4's HttpConnector mode by correctly setting the compliance level to RFC2965 when in legacy mode. The changes look correct and are well-supported by an expansion of the test suite to be parameterized, which will help prevent future regressions across different runtime configurations.
I have a couple of minor suggestions regarding coding style in JettyHttpProxy.java to improve consistency and adherence to common Java conventions.
Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
| import static java.util.concurrent.TimeUnit.SECONDS; | ||
| import static org.awaitility.Awaitility.await; | ||
|
|
||
| import com.google.appengine.repackaged.com.google.protobuf.ByteString; |
There was a problem hiding this comment.
This might be a pb when pushing to google3 where we use un repackaged. I will try and might have to clone in a CL to fix, and then push back to gh.
There was a problem hiding this comment.
or better, keep them in the same place, so our automation back to google3 will be happy.
There was a problem hiding this comment.
my intellij has somehow lost the correct import ordering in the codestyle settings, so its being auto formatted badly
I will revert
|
|
||
| return allVersions.stream() | ||
| .filter(v -> v[0].toString().equals(javaVersionForTest)) | ||
| .filter(v -> v[0].toString().equals(javaVersionForTest) || v[1].equals("9.4")) |
There was a problem hiding this comment.
Our GH actions fail for jdk25 and 26 ea as they use bytecode for jsdk25, and I assume jetty 9.4 runtime does not work for these runtimes, so we need to filter 9.4 with excluding 25 and 26-ea See https://github.com/GoogleCloudPlatform/appengine-java-standard/actions/runs/18166264666
and jdk25 profile used in
There was a problem hiding this comment.
I wouldn't expect any issues using JDK 25 with Jetty 9.4, so I don't know why this would be failing.
Seemed to be some JVM crash in GuestBookTest, but I couldn't see why, and didn't happen for me locally.
Signed-off-by: Lachlan Roberts <lachlan.p.roberts@gmail.com>
|
Locally, you have only one JDK, and you compile all with whatever is default in pom. |
PiperOrigin-RevId: 813962202 Change-Id: Icd014d5128b4bdbf2c96a7758b57b5d9648e3ede
|
Thanks!, merged now with newly added internal files for internal tests |
The Cookie Compliance was not set to
RFC2965whenLEGACY_MODEwas true on Jetty 9.4 runtimes whenuseHttpConnector=true.This would have been shown as a failure in
CookieComplianceTestif was parameterized over all the possible runtime options.