Conversation
…content-type matching CXF now requires Jakarta Servlet 6.x, so the runtime checks for Servlet 3.0/3.1 availability are dead code. This commit: - Removes the isServlet3 field and reflection check in AbstractHTTPDestination - Merges Servlet31Continuation into Servlet3Continuation (removing the subclass) - Removes the IS_31 static check in Servlet3ContinuationProvider - Simplifies retrieveFromContinuation and setupContinuation - Fixes FormUtils.isFormPostRequest() to use startsWith instead of equals, so content types like "application/x-www-form-urlencoded;charset=UTF-16BE" are correctly recognized as form posts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
CI failure is in |
rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
Outdated
Show resolved
Hide resolved
...ransports/http/src/main/java/org/apache/cxf/transport/http/Servlet3ContinuationProvider.java
Outdated
Show resolved
Hide resolved
The merged continuation class now includes Servlet 3.1 features (WriteListener, isReady), so rename it to Servlet31Continuation to reflect the actual API baseline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
gnodet
left a comment
There was a problem hiding this comment.
Thanks for the review @reta!
Servlet31Continuation rename: Applied — renamed Servlet3Continuation to Servlet31Continuation since the merged class now includes Servlet 3.1 features (WriteListener support, isReady). Pushed as a new commit.
FormUtils change: The existing isFormPostRequest uses equals() to match the content type, but in practice the Content-Type header can include parameters like application/x-www-form-urlencoded; charset=UTF-8. The strict equality check causes form POST requests with charset parameters to be missed. Switching to startsWith() handles this correctly. I noticed this while working on the servlet compat cleanup — happy to split it out to a separate PR if you prefer.
Thanks @gnodet , to be fair seeing |
|
@reta Good question! The
While URL-encoding restricts the bytes on the wire to ASCII, the charset parameter tells the server how to decode percent-encoded sequences back to characters (e.g. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The 5-second timeout introduced in #2962 is still not sufficient for CI environments under load. Tracing tests like testThatNewSpanIsCreatedOnClientTimeout continue to fail with ConditionTimeoutException at the 5-second mark. Increase all Awaitility timeouts to 10 seconds across all tracing test files. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
||
| // Await till flush happens, usually a second is enough | ||
| await().atMost(Duration.ofSeconds(5L)).until(()-> TestSpanHandler.getAllSpans().size() == 4); | ||
| await().atMost(Duration.ofSeconds(10L)).until(()-> TestSpanHandler.getAllSpans().size() == 4); |
There was a problem hiding this comment.
Yes, but they belong to a different PR. I merged the PRs into this one to work around the flaky tests in CI and make PR green. The idea would be to merge the other PRs first, then rebase this one.
Summary
isServlet3field andServletRequest.class.getMethod("isAsyncSupported")reflection check fromAbstractHTTPDestinationIS_31static check andServlet31Continuationsubclass fromServlet3ContinuationProvider, merging the Servlet 3.1 behavior (NIOWriteListenersupport,isReady()) into the baseServlet3ContinuationclassretrieveFromContinuation()andsetupContinuation()methodsSupersedes #702.
Test plan
rt/transports/httpmodule compiles and tests passAsyncResponseImplTestpasses (usesServlet3ContinuationProvider)🤖 Generated with Claude Code