Skip to content

Fix error due to output buffer not finalized correctly#1724

Merged
kevinthfang merged 2 commits intorelease/0.4.xfrom
fix-http-compress-1
Jun 21, 2024
Merged

Fix error due to output buffer not finalized correctly#1724
kevinthfang merged 2 commits intorelease/0.4.xfrom
fix-http-compress-1

Conversation

@nudles
Copy link
Copy Markdown
Collaborator

@nudles nudles commented Jun 21, 2024

When http requests come with 'compressed=1', HTTPHandler uses CompressedWriteBuffer. But it missed to call its finalize() explicitly. Then finalize() is invoked in the dctor, which happens after the response is sent. As a result, the response has incomplete data.

This commit fixes it by calling the finalize() method explicitly.

fix #1698

refer to ClickHouse/ClickHouse#58846

nudles added 2 commits June 20, 2024 13:56
When http requests come with 'compressed=1', HTTPHandler
uses CompressedWriteBuffer. But it missed to call its
finalize() explicitly. Then finalize() is invoked in
the dctor, which happens after the response is sent.
As a result, the response has incomplete data.
@nudles nudles changed the title Fix http compress 1 Fix error due to output buffer not finalized correctly Jun 21, 2024
@nudles nudles requested a review from kevinthfang June 21, 2024 03:44
@kevinthfang kevinthfang merged commit 5db242b into release/0.4.x Jun 21, 2024
@kevinthfang kevinthfang deleted the fix-http-compress-1 branch June 21, 2024 08:15
nudles added a commit that referenced this pull request Aug 26, 2024
Fix error due to output buffer not finalized correctly
nudles added a commit that referenced this pull request Aug 26, 2024
Fix error due to output buffer not finalized correctly
nudles added a commit that referenced this pull request Aug 30, 2024
Merge pull request #1724 from ByConity/fix-http-compress-1
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.

2 participants