Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/duckdb/src/function/table/version/pragma_version.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef DUCKDB_PATCH_VERSION
#define DUCKDB_PATCH_VERSION "4-dev14"
#define DUCKDB_PATCH_VERSION "4-dev17"
#endif
#ifndef DUCKDB_MINOR_VERSION
#define DUCKDB_MINOR_VERSION 4
Expand All @@ -8,10 +8,10 @@
#define DUCKDB_MAJOR_VERSION 1
#endif
#ifndef DUCKDB_VERSION
#define DUCKDB_VERSION "v1.4.4-dev14"
#define DUCKDB_VERSION "v1.4.4-dev17"
#endif
#ifndef DUCKDB_SOURCE_ID
#define DUCKDB_SOURCE_ID "200198b3e0"
#define DUCKDB_SOURCE_ID "1c03ec0812"
#endif
#include "duckdb/function/table/system_functions.hpp"
#include "duckdb/main/database.hpp"
Expand Down
10 changes: 9 additions & 1 deletion src/duckdb/src/include/duckdb/common/http_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ struct BaseRequest {
const string &url;
string path;
string proto_host_port;
const HTTPHeaders &headers;
HTTPHeaders headers;
HTTPParams &params;
//! Whether or not to return failed requests (instead of throwing)
bool try_request = false;
Expand All @@ -157,6 +157,14 @@ struct BaseRequest {
const TARGET &Cast() const {
return reinterpret_cast<const TARGET &>(*this);
}

static HTTPHeaders MergeHeaders(const HTTPHeaders &headers, HTTPParams &params) {
HTTPHeaders result = headers;
for (const auto &header : params.extra_headers) {
result.Insert(header.first, header.second);
}
return result;
}
};

struct GetRequestInfo : public BaseRequest {
Expand Down
5 changes: 1 addition & 4 deletions src/duckdb/src/main/http/http_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ unique_ptr<HTTPResponse> HTTPUtil::Request(BaseRequest &request, unique_ptr<HTTP
}

BaseRequest::BaseRequest(RequestType type, const string &url, const HTTPHeaders &headers, HTTPParams &params)
: type(type), url(url), headers(headers), params(params) {
: type(type), url(url), headers(MergeHeaders(headers, params)), params(params) {
HTTPUtil::DecomposeURL(url, path, proto_host_port);
}

Expand Down Expand Up @@ -191,9 +191,6 @@ class HTTPLibClient : public HTTPClient {
for (auto &entry : header_map) {
headers.insert(entry);
}
for (auto &entry : params.extra_headers) {
headers.insert(entry);
}
return headers;
}

Expand Down