From 50d89279b738c60d2532b88ad8363c2a93af0881 Mon Sep 17 00:00:00 2001 From: "Damien Buhl (alias daminetreg)" Date: Tue, 8 Jun 2021 17:28:57 +0200 Subject: [PATCH] :wink: non standard headers on native platforms. --- xxhr/impl/session-beast.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/xxhr/impl/session-beast.hpp b/xxhr/impl/session-beast.hpp index 3f695a50..de696e65 100644 --- a/xxhr/impl/session-beast.hpp +++ b/xxhr/impl/session-beast.hpp @@ -382,7 +382,12 @@ namespace xxhr { for (auto&& entry : header) { auto& h = entry.first; auto& v = entry.second; - req_.set(boost::beast::http::string_to_field(h), v); + auto field = boost::beast::http::string_to_field(h); + if (field == boost::beast::http::field::unknown) { + req_.insert(h, v); + } else { + req_.set(field, v); + } } }