From 6e30c0701cc416ef3c8a1e3328f1889a6108ea84 Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Sun, 17 Jul 2011 14:39:53 +1000 Subject: [PATCH] longpoll seems to work either way with post or get but some servers prefer get so change to httpget. --- util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util.c b/util.c index 982f9ec9..bf0f2888 100644 --- a/util.c +++ b/util.c @@ -259,7 +259,10 @@ json_t *json_rpc_call(CURL *curl, const char *url, curl_easy_setopt(curl, CURLOPT_USERPWD, userpass); curl_easy_setopt(curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); } - curl_easy_setopt(curl, CURLOPT_POST, 1); + if (longpoll) + curl_easy_setopt(curl, CURLOPT_HTTPGET, 1); + else + curl_easy_setopt(curl, CURLOPT_POST, 1); if (opt_protocol) applog(LOG_DEBUG, "JSON protocol request:\n%s\n", rpc_req);