Tweak the User-Agent header to comply with RFC 2616

This commit is contained in:
pooler 2013-03-24 15:31:40 +01:00
parent 5b9fd9c731
commit 6f6b99c0e7

3
util.c
View file

@ -349,7 +349,8 @@ json_t *json_rpc_call(CURL *curl, const char *url,
headers = curl_slist_append(headers, headers = curl_slist_append(headers,
"Content-Type: application/json"); "Content-Type: application/json");
headers = curl_slist_append(headers, len_hdr); headers = curl_slist_append(headers, len_hdr);
headers = curl_slist_append(headers, "User-Agent: " PACKAGE_STRING); headers = curl_slist_append(headers,
"User-Agent: " PACKAGE_NAME "/" PACKAGE_VERSION);
headers = curl_slist_append(headers, headers = curl_slist_append(headers,
"X-Mining-Extensions: midstate"); "X-Mining-Extensions: midstate");
headers = curl_slist_append(headers, "Accept:"); /* disable Accept hdr*/ headers = curl_slist_append(headers, "Accept:"); /* disable Accept hdr*/