make sure that server does not send body on HTTP HEAD#80860
Merged
Conversation
Contributor
7747c00 to
c448aa1
Compare
Michicosun
approved these changes
May 30, 2025
| auto str = header.str(); | ||
| header_stream = std::make_shared<AutoFinalizedWriteBuffer<WriteBufferFromPocoSocket>>(session.socket(), write_event, str.size()); | ||
| header_stream->write(str); | ||
| header_stream->write(str.data(), str.size()); |
Member
Author
There was a problem hiding this comment.
Because only WriteBufferFromPocoSocket has
void write(const std::string & str) method.
Ordinary WriteBuffer has only
void write(const char * from, size_t n)
Co-authored-by: Mikhail Artemenko <[email protected]>
306413e to
2aee21e
Compare
This was referenced Jun 2, 2025
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.
Fixes #80725
Servet should never send message body on HTTP HEAD request. Otherwise the connection is poisoned because client does not read a body, in case if keep alive, the next request fails in surprising way.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes to CHANGELOG.md):
fix and make sure that clickhouse server does not send body on HTTP HEAD request
Documentation entry for user-facing changes