Skip to content

Enforce verbatim response fetching in HttpWaitStrategy (#7326)#11937

Open
ivankrn wants to merge 1 commit into
testcontainers:mainfrom
ivankrn:preserve-response-in-httpwaitstrategy
Open

Enforce verbatim response fetching in HttpWaitStrategy (#7326)#11937
ivankrn wants to merge 1 commit into
testcontainers:mainfrom
ivankrn:preserve-response-in-httpwaitstrategy

Conversation

@ivankrn

@ivankrn ivankrn commented Jul 19, 2026

Copy link
Copy Markdown

This PR replaces manual stream reading with a standard utility method to fix #7326, because Apache's IOUtils.toString() preserves raw response formatting and line breaks unlike BufferedReader's readLine(), and also buffers the input internally, so there is no need to use manual buffering.
The same approach has already been used in ContainerDatabaseDriver, ScriptUtils, etc.

…s#7326)

- Fix line ending truncation during response fetching
- Fix unintended newline appending in the nc test container command

Signed-off-by: Ivan Kropotin <102463202+ivankrn@users.noreply.github.com>
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.

[Bug]: HttpWaitStrategy removes line breaks in http response body before responsePredicate invocation

1 participant