mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-15 12:14:18 +00:00
add user content-type overriding
This commit is contained in:
parent
eb4a74d741
commit
d9b3a2732b
@ -24,17 +24,17 @@ WriteBufferFromHTTP::WriteBufferFromHTTP(
|
||||
request.setHost(uri.getHost());
|
||||
request.setChunkedTransferEncoding(true);
|
||||
|
||||
if (!content_type.empty())
|
||||
{
|
||||
request.set("Content-Type", content_type);
|
||||
}
|
||||
|
||||
if (!content_encoding.empty())
|
||||
request.set("Content-Encoding", content_encoding);
|
||||
|
||||
for (const auto & header: additional_headers)
|
||||
request.add(header.name, header.value);
|
||||
|
||||
if (!content_type.empty() && !request.has("Content-Type"))
|
||||
{
|
||||
request.set("Content-Type", content_type);
|
||||
}
|
||||
|
||||
LOG_TRACE((getLogger("WriteBufferToHTTP")), "Sending request to {}", uri.toString());
|
||||
|
||||
ostr = &session->sendRequest(request);
|
||||
|
Loading…
Reference in New Issue
Block a user