Commit 401983136c34e762692220226a197c4c8ed45d27

Con Kolivas 2011-07-24T17:34:57

Do away with GET for dealing with longpoll forever. POST is the one that works everywhere, not the other way around.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
diff --git a/util.c b/util.c
index b35508d..8b647ae 100644
--- a/util.c
+++ b/util.c
@@ -343,12 +343,9 @@ 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);
 	}
-	if (longpoll) {
-		curl_easy_setopt(curl, CURLOPT_HTTPGET, 1);
+	if (longpoll)
 		curl_easy_setopt(curl, CURLOPT_SOCKOPTFUNCTION, json_rpc_call_sockopt_cb);
-	} else {
-		curl_easy_setopt(curl, CURLOPT_POST, 1);
-	}
+	curl_easy_setopt(curl, CURLOPT_POST, 1);
 
 	if (opt_protocol)
 		applog(LOG_DEBUG, "JSON protocol request:\n%s\n", rpc_req);