Migrate from legacy com.ning async-http-client to org.asynchttpclient#453
Merged
Conversation
The multipart request builder depended on com.ning:async-http-client (1.9.x), which has been EOL/unmaintained for years -- upstream development moved to org.asynchttpclient long ago. Keeping the Ning artifact pins a stale, unsupported HTTP/Netty stack on the classpath and blocks dependency and security updates that flow through basepom. Bumping basepom to 69.3 makes the maintained artifact (and a consistent Netty) available, so the multipart body construction is moved over to it and the obsolete end-boundary workaround is dropped (the new MultipartUtils already appends the message-end part). Co-Authored-By: Claude Opus 4.8 (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.
Why
The multipart request builder depended on
com.ning:async-http-client(1.9.x),which has been EOL/unmaintained for years — upstream development moved to
org.asynchttpclient:async-http-clientlong ago. Keeping the Ning artifact pinsa stale, unsupported HTTP/Netty stack on the classpath and blocks dependency and
security updates that flow through basepom.
What
basepom68.1 → 69.3 andhorizon0.5.3 → 0.5.4, whichbrings in dependency management for the maintained
org.asynchttpclientartifact and a consistent Netty version.
com.ning:async-http-clientwithorg.asynchttpclient:async-http-client, and declaredio.netty:netty-bufferand
io.netty:netty-codec-httpdirectly since the new multipart API surfacesNetty types (
ByteBuf,HttpHeaders) the builder now uses.com.ning.http.client.multipart.*toorg.asynchttpclient.request.body.multipart.*.Part.setFileName(...)nolonger exists, so file names are passed via the
ByteArrayPart/FilePartconstructors. Body bytes are produced by draining a
MultipartUtils.newMultipartBody(...)MultipartBodyinto aByteBuf.TerminatingMultipartRequestEntity: it existed only to append thetrailing MIME end-boundary that the old JDK provider omitted. The new
MultipartUtils.generateMultipartPartsalready appends aMessageEndMultipartPart, making the workaround obsolete.Notes
FilePartconstructor eagerly validates that the file exists and isreadable (throws
IllegalArgumentException), so a bad path now fails atbuild()time rather than at write time....http.ningpackage name was left unchanged to avoid rippling importchanges through
SlackWebClient.mvn clean verifypasses across all modules.🤖 Generated with Claude Code