summaryrefslogtreecommitdiff
path: root/indra/llmessage
diff options
context:
space:
mode:
authorAimee Linden <aimee@lindenlab.com>2010-06-28 16:30:08 +0100
committerAimee Linden <aimee@lindenlab.com>2010-06-28 16:30:08 +0100
commit6fcc0994dff2bd88256ff8306c8df670df627ef6 (patch)
tree4e91fcc3b71be8e1b142f17f190909ee7bca6157 /indra/llmessage
parent9aad318fb9b9480a87d87db902dd2f064d9348af (diff)
EXT-7498 WIP Snapshot Sharing
Reviewed by Tofu.
Diffstat (limited to 'indra/llmessage')
-rw-r--r--indra/llmessage/llhttpclient.cpp11
-rw-r--r--indra/llmessage/llurlrequest.cpp5
-rw-r--r--indra/llmessage/llurlrequest.h5
3 files changed, 18 insertions, 3 deletions
diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp
index e8dc207114..5d9448b42c 100644
--- a/indra/llmessage/llhttpclient.cpp
+++ b/indra/llmessage/llhttpclient.cpp
@@ -240,9 +240,14 @@ static void request(
lldebugs << LLURLRequest::actionAsVerb(method) << " " << url << " "
<< headers << llendl;
- // Insert custom headers is the caller sent any
- if (headers.isMap())
- {
+ // Insert custom headers if the caller sent any
+ if (headers.isMap())
+ {
+ if (headers.has("Cookie"))
+ {
+ req->allowCookies();
+ }
+
LLSD::map_const_iterator iter = headers.beginMap();
LLSD::map_const_iterator end = headers.endMap();
diff --git a/indra/llmessage/llurlrequest.cpp b/indra/llmessage/llurlrequest.cpp
index 1e76d10828..295f69e902 100644
--- a/indra/llmessage/llurlrequest.cpp
+++ b/indra/llmessage/llurlrequest.cpp
@@ -251,6 +251,11 @@ void LLURLRequest::useProxy(const std::string &proxy)
mDetail->mCurlRequest->setoptString(CURLOPT_PROXY, proxy);
}
+void LLURLRequest::allowCookies()
+{
+ mDetail->mCurlRequest->setoptString(CURLOPT_COOKIEFILE, "");
+}
+
// virtual
LLIOPipe::EStatus LLURLRequest::handleError(
LLIOPipe::EStatus status,
diff --git a/indra/llmessage/llurlrequest.h b/indra/llmessage/llurlrequest.h
index 69fd22e592..378cc56374 100644
--- a/indra/llmessage/llurlrequest.h
+++ b/indra/llmessage/llurlrequest.h
@@ -189,6 +189,11 @@ public:
*/
void useProxy(const std::string& proxy);
+ /**
+ * @brief Turn on cookie handling for this request with CURLOPT_COOKIEFILE.
+ */
+ void allowCookies();
+
public:
/**
* @brief Give this pipe a chance to handle a generated error