aboutsummaryrefslogtreecommitdiffstats
path: root/community/net-cpp/0003-Set-the-Content-Type-header-on-POST-otherwise-stuff-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/net-cpp/0003-Set-the-Content-Type-header-on-POST-otherwise-stuff-.patch')
-rw-r--r--community/net-cpp/0003-Set-the-Content-Type-header-on-POST-otherwise-stuff-.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/community/net-cpp/0003-Set-the-Content-Type-header-on-POST-otherwise-stuff-.patch b/community/net-cpp/0003-Set-the-Content-Type-header-on-POST-otherwise-stuff-.patch
new file mode 100644
index 0000000000..682618f096
--- /dev/null
+++ b/community/net-cpp/0003-Set-the-Content-Type-header-on-POST-otherwise-stuff-.patch
@@ -0,0 +1,30 @@
+From 8567cc6014399259bf6efa5574f0ac7e98e70094 Mon Sep 17 00:00:00 2001
+From: Luca Weiss <luca@z3ntu.xyz>
+Date: Sat, 9 Feb 2019 01:32:44 +0100
+Subject: [PATCH 3/3] Set the Content-Type header on POST, otherwise stuff
+ breaks
+
+---
+ src/core/net/http/impl/curl/client.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/core/net/http/impl/curl/client.cpp b/src/core/net/http/impl/curl/client.cpp
+index ba68cda..f49ce67 100644
+--- a/src/core/net/http/impl/curl/client.cpp
++++ b/src/core/net/http/impl/curl/client.cpp
+@@ -158,9 +158,12 @@ std::shared_ptr<http::impl::curl::Request> http::impl::curl::Client::post_impl(
+ const std::string& ct)
+ {
+ ::curl::easy::Handle handle;
++ http::Header ctheader;
++ ctheader.set("Content-Type", ct);
+ handle.method(http::Method::post)
+ .url(configuration.uri.c_str())
+ .header(configuration.header)
++ .header(ctheader)
+ .post_data(payload.c_str(), ct);
+
+ handle.set_option(::curl::Option::ssl_verify_host,
+--
+2.20.1
+