test: cover line subscriber UTF-8 and newline boundaries - #11
Open
crowndlt wants to merge 1 commit into
Open
Conversation
Owner
|
Close since it seems agent spam. Reopen only if you're not a bot. |
Author
|
No worries, I saw the original bounty was withdrawn, so I'll leave it here. Thanks for taking a look! |
Owner
|
Hi @crowndlt, Sorry, I've reopened this PR. Too many bots suddenly appeared for unknown reasons. I will take a look soon. Thanks for your contribution! |
lqhuang
marked this pull request as ready for review
September 9, 2026 03:48
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.
Adds eight tests for UTF-8 decoding and line boundaries in
BodySubscribers.fromLineSubscriber, following the discussion in requests-scala#156.The cases cover multibyte characters split across buffers and
onNextcalls, byte-at-a-time delivery, CR/LF/CRLF with the default separator, and an incomplete UTF-8 sequence at EOF. An explicit LF separator is included as a control.Validation on Linux:
Keeping this as a draft because it adds reproducing tests and the implementation still needs fixing. The PR changes only the test file.
To run the suite, use
modules.java-http-client.jvm.test.testOnly snhttp.test.java.net.http.BodySubscribersLineTestormodules.java-http-client.test.testOnly snhttp.test.java.net.http.BodySubscribersLineTestwith Mill.For any follow-up fixes, would these issues fall within the scope of the original bounty?