Connected to ClickHouse server version 21.13.1 revision 54455.

```
INSERT INTO FUNCTION s3('https://s3.us-east-1.amazonaws.com/dzhuravlev/small_file.xml.gz', 'XML', 
'number UInt64', 'gz') SELECT * FROM numbers(10);

INSERT INTO FUNCTION s3('https://s3.us-east-1.amazonaws.com/dzhuravlev/large_file.xml.gz','XML', 
'number UInt64','gz') SELECT * from numbers(1e8);

aws s3api head-object --bucket  dzhuravlev  --key small_file.xml.gz
{
    "AcceptRanges": "bytes",
    "LastModified": "Mon, 24 Jan 2022 21:28:50 GMT",
    "ContentLength": 262,
    "ETag": "\"667796620f85cd6bad6957ea01d29548\"",
    "ContentType": "binary/octet-stream",
    "Metadata": {}
}

aws s3api head-object --bucket  dzhuravlev --key large_file.xml.gz
{
    "AcceptRanges": "bytes",
    "LastModified": "Mon, 24 Jan 2022 21:29:08 GMT",
    "ContentLength": 261909920,
    "ETag": "\"829dbc9697bcffd1528e8e6f55c564f4-8\"",
    "ContentType": "application/xml",                      ---<<<<<<<<<<<-- expected "ContentType": "binary/octet-stream",
    "Metadata": {}
}
```

So it seems that if the object size is bigger than 32MB then Clickhouse sets the wrong ContentType `application/xml` instead of `binary/octet-stream`.

{
    auto size = temporary_buffer->tellp();
    LOG_DEBUG(log, "Writing part. Bucket: {}, Key: {}, Upload_id: {}, Size: {}", bucket, key, multipart_upload_id, size);
    if (size < 0)
    {
        LOG_WARNING(log, "Skipping part upload. Buffer is in bad state, it means that we have tried to upload something, but got an exception.");
        return;
    }
    if (size == 0)
    {
        LOG_DEBUG(log, "Skipping writing part. Buffer is empty.");
        return;
    }
    if (part_tags.size() == S3_WARN_MAX_PARTS)
    {
        
        LOG_WARNING(log, "Maximum part number in S3 protocol has reached (too many parts). Server may not accept this whole upload.");
    }
    if (schedule)
    {
        UploadPartTask * task = nullptr;
        int part_number;
        {
            std::lock_guard lock(bg_tasks_mutex);
            task = &upload_object_tasks.emplace_back();
            ++num_added_bg_tasks;
            part_number = num_added_bg_tasks;
        }
        fillUploadRequest(task->req, part_number);