Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dequis/purple-facebook.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2016-11-21 16:23:40 +0300
committerdequis <dx@dxzone.com.ar>2016-11-21 16:26:05 +0300
commit93d01fa16b2ea587db81a226a32d406eeccc4e9d (patch)
tree6d6a892beae8a63286b37a3899f5df5eb4241ed3
parent4bff1463869934e1b2ea83d166746bea08045714 (diff)
Set a non-empty HTTP User-Agent
Shot in the dark to fix checkpoint issues, but had to be done anyway.
-rw-r--r--patches/08-user-agent.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/patches/08-user-agent.patch b/patches/08-user-agent.patch
new file mode 100644
index 0000000..d46f344
--- /dev/null
+++ b/patches/08-user-agent.patch
@@ -0,0 +1,27 @@
+--- a/libpurple/protocols/facebook/api.h 2016-11-21 09:56:02.734212775 -0300
++++ b/libpurple/protocols/facebook/api.h 2016-11-21 10:14:38.808696834 -0300
+@@ -91,6 +91,13 @@
+ #define FB_API_SECRET "374e60f8b9bb6b8cbb30f78030438895"
+
+ /**
++ * FB_API_AGENT:
++ *
++ * The HTTP User-Agent header.
++ */
++#define FB_API_AGENT "Facebook plugin / Purple / 0.9"
++
++/**
+ * FB_API_URL_ATTACH:
+ *
+ * The URL for attachment URL requests.
+--- a/libpurple/protocols/facebook/api.c 2016-11-21 09:56:02.734212775 -0300
++++ b/libpurple/protocols/facebook/api.c 2016-11-21 10:15:05.214906611 -0300
+@@ -762,6 +762,8 @@
+ g_free(data);
+ }
+
++ purple_http_request_header_set(req, "User-Agent", FB_API_AGENT);
++
+ data = fb_http_params_close(params, NULL);
+ purple_http_request_set_contents(req, data, -1);
+ ret = purple_http_request(priv->gc, req, callback, api);