summaryrefslogtreecommitdiff
path: root/indra/llmessage/llhttpclient.cpp
diff options
context:
space:
mode:
authorDave Simmons <simon@lindenlab.com>2009-03-20 20:00:47 +0000
committerDave Simmons <simon@lindenlab.com>2009-03-20 20:00:47 +0000
commit24b26d71ee01211aa796b8061b66ec06a133e4ce (patch)
tree96bffcd019c933ad3ebbfd5f096968108b22aab5 /indra/llmessage/llhttpclient.cpp
parent5dfd435872e36445dcc82f99443dfc5a7ee0805a (diff)
svn merge -r113004:115000 svn+ssh://svn.lindenlab.com/svn/linden/branches/server/server-1.26
Merge latest 1.26 into trunk
Diffstat (limited to 'indra/llmessage/llhttpclient.cpp')
-rw-r--r--indra/llmessage/llhttpclient.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp
index 884ec1309d..a6041b4139 100644
--- a/indra/llmessage/llhttpclient.cpp
+++ b/indra/llmessage/llhttpclient.cpp
@@ -402,6 +402,14 @@ LLSD LLHTTPClient::blockingGet(const std::string& url)
curl_easy_setopt(curlp, CURLOPT_ERRORBUFFER, curl_error_buffer);
curl_easy_setopt(curlp, CURLOPT_FAILONERROR, 1);
+ struct curl_slist *header_list = NULL;
+ header_list = curl_slist_append(header_list, "Accept: application/llsd+xml");
+ CURLcode curl_result = curl_easy_setopt(curlp, CURLOPT_HTTPHEADER, header_list);
+ if ( curl_result != CURLE_OK )
+ {
+ llinfos << "Curl is hosed - can't add Accept header for llsd+xml" << llendl;
+ }
+
LLSD response = LLSD::emptyMap();
S32 curl_success = curl_easy_perform(curlp);
@@ -423,6 +431,12 @@ LLSD LLHTTPClient::blockingGet(const std::string& url)
response["body"] = http_buffer.asLLSD();
}
+ if(header_list)
+ { // free the header list
+ curl_slist_free_all(header_list);
+ header_list = NULL;
+ }
+
curl_easy_cleanup(curlp);
return response;