Repository navigation
Manage HttpClient 5 versions in the root pom; close SSE responses immediately in ApacheHc5Transport - #432
Merged
Conversation
…SSE responses immediately in the Apache HttpClient 5 transport. - Root pom: add httpclient5.version / httpcore5.version properties and a dependencyManagement block for httpclient5, httpclient5-cache, httpcore5 and httpcore5-h2. Drop the duplicate override in juneau-integration-tests and the inline version in juneau-rest-client-apache-httpclient-50. Resolved versions are unchanged (5.6.4 / 5.4.3). - ApacheHc5Transport: a graceful close drains the entity before releasing the connection, which never completes on an open-ended text/event-stream response, so close() blocked until the server ended the stream. Close SSE responses with CloseMode.IMMEDIATE, and use IMMEDIATE on the failed-wiring cleanup path. Adds a regression test. Salvaged from #425. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Salvages the independent, non-breaking pieces of #425 without changing the HttpClient 4.5 modules.
Changes
Root-pom management of HttpComponents 5 versions
httpclient5.version(5.6.4) andhttpcore5.version(5.4.3) properties.<dependencyManagement>block forhttpclient5,httpclient5-cache,httpcore5andhttpcore5-h2.juneau-integration-testsand the inline version injuneau-rest-client-apache-httpclient-50.httpcore5stays at 5.4.3, the versionhttpclient55.6.4 is built against.ApacheHc5Transport: close SSE responses immediatelyclose()drains the entity before releasing the connection. On an open-endedtext/event-streamresponse that drain never finishes, soTransportResponse.close()blocked until the server ended the stream.CloseMode.IMMEDIATE. The failed-wiring cleanup path also usesIMMEDIATE, because a connection we're abandoning shouldn't be reused.ApacheHc5Transport_Test.a04_sse_closeDoesNotWaitForStreamEnd. It fails onmaster, whereclose()blocks until the server ends the stream (about 40s), and passes with this change.Not included from #425
juneau-rest-client-apache-httpclient-45transport stays on HttpClient 4.5. HttpClient 5 support for the NG client is already provided byjuneau-rest-client-apache-httpclient-50.juneau-rest-client-classicandjuneau-rest-common-classicstay on HttpClient 4.5 / HttpCore 4.4, so 9.x users keep source compatibility.Testing
juneau-rest-client-apache-httpclient-50: 29 tests, 0 failures.mvn validatepasses.juneau-integration-testsresolves the same HttpComponents 5 versions as before.🤖 Generated with Claude Code