aboutsummaryrefslogtreecommitdiffstats
path: root/facebook/facebook-http.c
diff options
context:
space:
mode:
authordequis <dx@dxzone.com.ar>2017-07-07 05:49:57 -0300
committerdequis <dx@dxzone.com.ar>2017-07-07 06:22:20 -0300
commit8bbf163cfb796524754d7872e148c9793cd4452f (patch)
tree7d1d8dbd182295564896de80c6d4edca66e6043b /facebook/facebook-http.c
parent5352f5822f0d12655b1120f76ec712713aa02079 (diff)
downloadbitlbee-facebook-8bbf163cfb796524754d7872e148c9793cd4452f.tar.gz
bitlbee-facebook-8bbf163cfb796524754d7872e148c9793cd4452f.tar.bz2
bitlbee-facebook-8bbf163cfb796524754d7872e148c9793cd4452f.tar.xz
Add tweak values 1-15, sets orca version in the user agent
Since there are some issues I can't reproduce, let's do this experiment properly and figure out if this really matters. Value 1 is slightly newer. Value 2 is newer with the current set of fields. Value 3 is what purple-facebook uses. Adding 4 makes it http only, adding 8 makes it mqtt only. Some values are redundant. I suggest trying 1, 2, 3, 7 and 11.
Diffstat (limited to 'facebook/facebook-http.c')
-rw-r--r--facebook/facebook-http.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/facebook/facebook-http.c b/facebook/facebook-http.c
index 6234d55..7335848 100644
--- a/facebook/facebook-http.c
+++ b/facebook/facebook-http.c
@@ -242,6 +242,20 @@ fb_http_cookies_parse_request(FbHttp *http, FbHttpRequest *req)
g_strfreev(hdrs);
}
+void
+fb_http_set_agent(FbHttp *http, const gchar *agent)
+{
+ FbHttpPrivate *priv;
+
+ g_return_if_fail(FB_IS_HTTP(http));
+ priv = http->priv;
+
+ if (agent != priv->agent && g_strcmp0(agent, priv->agent)) {
+ g_free(priv->agent);
+ priv->agent = g_strdup(agent);
+ }
+}
+
FbHttpRequest *
fb_http_request_new(FbHttp *http, const gchar *url, gboolean post,
FbHttpFunc func, gpointer data)