FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Document that BodyState.STOP may carry the final bytes by hyperxpro · Pull Request #2255 · AsyncHttpClient/async-http-client · GitHub

Document that BodyState.STOP may carry the final bytes - #2255

Merged
hyperxpro merged 1 commit into
mainfrom
docs-stop-carries-data
Jul 18, 2026
Merged

Document that BodyState.STOP may carry the final bytes#2255
hyperxpro merged 1 commit into
mainfrom
docs-stop-carries-data

Conversation

Copy link
Copy Markdown
Member

Motivation:

PR #2232 changed MultipartBody.transferTo() to return STOP on the same call that writes the body's final bytes, meaning STOP may still be accompanied by unread data in the target buffer. However, BodyState.STOP is currently documented as meaning "nothing to read," and AuthenticatorUtils's auth-int loop assumes this behavior, which would truncate such a body (currently unreachable because multipart bodies do not use this path).

Modification:

Update the Body.transferTo() and BodyState.STOP documentation to clarify that STOP may accompany the final bytes and that consumers must drain the target buffer before stopping. Add a comment in the auth-int loop documenting its assumption.

Result:

The STOP-with-data contract is explicitly documented, and the existing assumption in AuthenticatorUtils is clearly identified. Documentation only; no behavioral changes.

hyperxpro merged commit 2afcbde into main Jul 18, 2026
17 checks passed
hyperxpro deleted the docs-stop-carries-data branch July 18, 2026 21:34
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL