diff options
author | dequis <dx@dxzone.com.ar> | 2017-06-08 21:21:18 +0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2017-06-08 21:21:18 +0300 |
commit | 92f8a6e0d4335d2a568eead7fa1a74e95d9602aa (patch) | |
tree | ff7f8bfbd991f1887a834fabd8bcdffebc9d7931 | |
parent | 3cbb433d12ba04111fd0ba3e6c86dac72cfc83a4 (diff) |
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.
-rw-r--r-- | patches/13-content-type.patch | 10 |
1 files changed, 10 insertions, 0 deletions
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); |