From 92f8a6e0d4335d2a568eead7fa1a74e95d9602aa Mon Sep 17 00:00:00 2001 From: dequis Date: Thu, 8 Jun 2017 15:21:18 -0300 Subject: Add content-type header to all requests, fixes http error 400 The content-type header became required for /method/auth.login and other endpoints with POST data like image attachments. --- patches/13-content-type.patch | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 patches/13-content-type.patch diff --git a/patches/13-content-type.patch b/patches/13-content-type.patch new file mode 100644 index 0000000..88133ed --- /dev/null +++ b/patches/13-content-type.patch @@ -0,0 +1,10 @@ +--- a/libpurple/protocols/facebook/api.c 2017-06-08 13:50:51.660801537 -0300 ++++ b/libpurple/protocols/facebook/api.c 2017-06-08 13:50:48.960852585 -0300 +@@ -763,6 +763,7 @@ + } + + purple_http_request_header_set(req, "User-Agent", FB_API_AGENT); ++ purple_http_request_header_set(req, "Content-Type", "application/x-www-form-urlencoded; charset=utf-8"); + + data = fb_http_params_close(params, NULL); + purple_http_request_set_contents(req, data, -1); -- cgit v1.2.3