Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into decimal_fix_s390xbuild

This commit is contained in:
MeenaRenganathan22 2023-03-23 07:18:12 -07:00
commit 2460ef54fa

View File

@ -63,8 +63,10 @@ HTTPServerRequest::HTTPServerRequest(HTTPContextPtr context, HTTPServerResponse
}
else if (getMethod() != HTTPRequest::HTTP_GET && getMethod() != HTTPRequest::HTTP_HEAD && getMethod() != HTTPRequest::HTTP_DELETE)
{
/// That check for has_body may be false-negative in rare cases, but it's okay
bool has_body = in->hasPendingData();
stream = std::move(in);
if (!startsWith(getContentType(), "multipart/form-data"))
if (!startsWith(getContentType(), "multipart/form-data") && has_body)
LOG_WARNING(&Poco::Logger::get("HTTPServerRequest"), "Got an HTTP request with no content length "
"and no chunked/multipart encoding, it may be impossible to distinguish graceful EOF from abnormal connection loss");
}