diff options
Diffstat (limited to 'src/zenhttp/clients/httpclientcurlhelpers.h')
| -rw-r--r-- | src/zenhttp/clients/httpclientcurlhelpers.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zenhttp/clients/httpclientcurlhelpers.h b/src/zenhttp/clients/httpclientcurlhelpers.h index 0605a30f6..cb5f5d9a9 100644 --- a/src/zenhttp/clients/httpclientcurlhelpers.h +++ b/src/zenhttp/clients/httpclientcurlhelpers.h @@ -255,8 +255,13 @@ BuildHeaderList(const HttpClient::KeyValueMap& AdditionalHeader, Headers = curl_slist_append(Headers, AuthHeader.c_str()); } + bool HasContentTypeOverride = AdditionalHeader->contains("Content-Type"); for (const auto& [Key, Value] : ExtraHeaders) { + if (HasContentTypeOverride && Key == "Content-Type") + { + continue; + } ExtendableStringBuilder<128> HeaderLine; HeaderLine << Key << ": " << Value; Headers = curl_slist_append(Headers, HeaderLine.c_str()); |