Skip to content

Commit 6f22256

Browse files
authored
Merge pull request #89 from Tmonster/only_add_content_type_if_not_already_added
Only add Content-Type if not already present in the headers
2 parents 21e996f + c86ffc5 commit 6f22256

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

extension/httpfs/httpfs_client.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,9 @@ class HTTPFSClient : public HTTPClient {
9292
req.method = "POST";
9393
req.path = info.path;
9494
req.headers = TransformHeaders(info.headers, info.params);
95-
req.headers.emplace("Content-Type", "application/octet-stream");
95+
if (req.headers.find("Content-Type") == req.headers.end()) {
96+
req.headers.emplace("Content-Type", "application/octet-stream");
97+
}
9698
req.content_receiver = [&](const char *data, size_t data_length, uint64_t /*offset*/,
9799
uint64_t /*total_length*/) {
98100
if (state) {

0 commit comments

Comments
 (0)