mirror of https://github.com/BOINC/boinc.git
client: set Content-type of POST requests to text/xml.
Otherwise some RPC-handling frameworks complain.
This commit is contained in:
parent
857b0a7ba5
commit
9456bd7e4d
|
@ -404,6 +404,8 @@ static int set_cloexec(void*, curl_socket_t fd, curlsocktype purpose) {
|
|||
int HTTP_OP::libcurl_exec(
|
||||
const char* url, const char* in, const char* out, double offset,
|
||||
#ifdef _WIN32
|
||||
// expected size of file we're downloading.
|
||||
// on Win, pre-allocate this file to reduce disk fragmentation
|
||||
double size,
|
||||
#else
|
||||
double,
|
||||
|
@ -559,6 +561,12 @@ int HTTP_OP::libcurl_exec(
|
|||
pcurlList = curl_slist_append(pcurlList, buf);
|
||||
}
|
||||
|
||||
// if this is a post, set content type (always text/xml)
|
||||
//
|
||||
if (is_post) {
|
||||
pcurlList = curl_slist_append(pcurlList, "Content-type: text/xml");
|
||||
}
|
||||
|
||||
// set up an output file for the reply
|
||||
//
|
||||
if (strlen(outfile)) {
|
||||
|
|
Loading…
Reference in New Issue