Repository navigation
Honor set_decompress(false) in response streams - #2640
Open
harbinresearcher wants to merge 1 commit into
Open
harbinresearcher wants to merge 1 commit into
harbinresearcher wants to merge 1 commit into
Conversation
Owner
|
There are a bunch of errors on the CI checks... |
This branch has not been deployed
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.
set_decompress(false)preserves encoded bytes withGet(), butopen_stream()currently ignores the option. Without zlib support a gzip response fails withUnsupportedContentEncoding; with zlib it succeeds but returns decoded text.stream::Get()inherits both behaviors.Honor the existing
decompress_flag before creating the streaming decoder. Keep the default decoding and unsupported-coding errors unchanged. No API, decoder algorithm, or dependency changes.The regression uses the existing fixed gzip fixture and real loopback responses. It checks buffered, low-level streaming, and
stream::Get()results for Content-Length, chunked, and close-delimited bodies, including byte preservation, encoding headers, and read errors. It fails on the original header in both no-codec and zlib-enabled builds, with six streaming failures in each; buffered controls pass.Validation on Windows amd64, GCC 14.2, C++11:
WebSocketPreRoutingTest.RejectWithoutAuthandWebSocketPreRequestTest.RejectWithoutAuth, also fail with the original header: both expect Content-Length 12 although the gzip response's length is 32. They are not changed here.git diff --checkpass; test-file UTF-8 BOM preserved.The initial unmodified offline test run had two failures also reproduced with the original pre-fix binary:
test/www/filewas converted from LF to CRLF at checkout, andSSEIntegrationTest.MaxReconnectAttemptstook about 12.4s against its 7s Windows threshold. The broad runs above use a private copy of test assets with that one fixture restored from the original Git blob, and exclude that existing timing test as well as the project's standard*_Onlineexclusion. The zlib run still has the two baseline failures described above, so this is not a claim of a fully green unfiltered suite. No test thresholds, source fixtures, Git settings, or system settings are changed by this PR. Local Linux, MSVC, TLS, Brotli, zstd, and sanitizers have not been validated.Fixes #2639.
Disclosure: implemented and tested autonomously by an AI coding agent under the account owner's authorization. An independent AI reviewer performed a static read-only review with no findings; this is not a claim of human review or independent runtime verification.