summaryrefslogtreecommitdiff
path: root/indra/llmessage/llhttpclient.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2008-05-13 23:04:17 +0000
committerJosh Bell <josh@lindenlab.com>2008-05-13 23:04:17 +0000
commit41e1ed5b4153019b07d97f54751db53fa248d8d4 (patch)
treef9fa644ca50c2673bd68b21ab3d3f3122e1d5221 /indra/llmessage/llhttpclient.cpp
parent52333fc8307b13fa83683d239305765aa48dc35b (diff)
svn merge -r 87164:87466 svn+ssh://svn.lindenlab.com/svn/linden/branches/Branch_1-21-Server --> release
Land store (already deployed to agni as 1.21 patches) * Increased the available purchase area in the land store. * Modified select pool query to take a simulator status. Now generating a new uuid for each insert into the fulfill lock table. * Checking to make sure put-simstate returns a uuid region_id. Other stuff (going out soon or already out) * svn merge -r87339 svn/linden/branches/havok4/havok4-6 (Block creation of mega prims.) * Fix for the mega prim fix to also block 0 scale prims. * svn merge -r 84565:86084 svn+ssh://svn.lindenlab.com/svn/linden/branches/single-ref-attach-again --> Branch_1-21-Server (Slipstream QAR-518 single ref attachments) * Switched off indra.known_address in favor of indra_aux.known_address * DEV-15151 check_group_land.py kills the database * DEV-14662 - Change the current model of PREPARE/EXECUTE to directly execute the SQL (QAR-580) * DEV-15167 Random failure with set-classified-stats The secret word is: dataserver-is-deprecated
Diffstat (limited to 'indra/llmessage/llhttpclient.cpp')
-rw-r--r--indra/llmessage/llhttpclient.cpp63
1 files changed, 44 insertions, 19 deletions
diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp
index 3b892aec50..859f3c1536 100644
--- a/indra/llmessage/llhttpclient.cpp
+++ b/indra/llmessage/llhttpclient.cpp
@@ -199,14 +199,15 @@ namespace
LLPumpIO* theClientPump = NULL;
}
-static void request(const std::string& url,
- LLURLRequest::ERequestAction method,
- Injector* body_injector,
- LLCurl::ResponderPtr responder,
- const LLSD& headers = LLSD(),
- const F32 timeout = HTTP_REQUEST_EXPIRY_SECS,
- S32 offset = 0,
- S32 bytes = 0)
+static void request(
+ const std::string& url,
+ LLURLRequest::ERequestAction method,
+ Injector* body_injector,
+ LLCurl::ResponderPtr responder,
+ const F32 timeout = HTTP_REQUEST_EXPIRY_SECS,
+ const LLSD& headers = LLSD(),
+ S32 offset = 0,
+ S32 bytes = 0)
{
if (!LLHTTPClient::hasPump())
{
@@ -237,7 +238,7 @@ static void request(const std::string& url,
req->useProxy(FALSE);
}
header << iter->first << ": " << iter->second.asString() ;
- llinfos << "header = " << header.str() << llendl;
+ lldebugs << "header = " << header.str() << llendl;
req->addHeader(header.str().c_str());
}
}
@@ -275,7 +276,16 @@ void LLHTTPClient::getByteRange(const std::string& url,
const LLSD& headers,
const F32 timeout)
{
- request(url, LLURLRequest::HTTP_GET, NULL, responder, LLSD(), timeout, offset, bytes);
+ // *FIX: Why is the headers argument ignored? Phoenix 2008-04-28
+ request(
+ url,
+ LLURLRequest::HTTP_GET,
+ NULL,
+ responder,
+ timeout,
+ LLSD(), // WTF? Shouldn't this be used?
+ offset,
+ bytes);
}
void LLHTTPClient::head(const std::string& url, ResponderPtr responder, const F32 timeout)
@@ -285,11 +295,11 @@ void LLHTTPClient::head(const std::string& url, ResponderPtr responder, const F3
void LLHTTPClient::get(const std::string& url, ResponderPtr responder, const LLSD& headers, const F32 timeout)
{
- request(url, LLURLRequest::HTTP_GET, NULL, responder, headers, timeout);
+ request(url, LLURLRequest::HTTP_GET, NULL, responder, timeout, headers);
}
void LLHTTPClient::getHeaderOnly(const std::string& url, ResponderPtr responder, const LLSD& headers, const F32 timeout)
{
- request(url, LLURLRequest::HTTP_HEAD, NULL, responder, headers, timeout);
+ request(url, LLURLRequest::HTTP_HEAD, NULL, responder, timeout, headers);
}
void LLHTTPClient::getHeaderOnly(const std::string& url, ResponderPtr responder, const F32 timeout)
{
@@ -406,12 +416,6 @@ void LLHTTPClient::post(const std::string& url, const U8* data, S32 size, Respon
request(url, LLURLRequest::HTTP_POST, new RawInjector(data, size), responder, timeout);
}
-void LLHTTPClient::del(const std::string& url, ResponderPtr responder, const F32 timeout)
-{
- request(url, LLURLRequest::HTTP_DELETE, NULL, responder, timeout);
-}
-
-#if 1
void LLHTTPClient::postFile(const std::string& url, const std::string& filename, ResponderPtr responder, const F32 timeout)
{
request(url, LLURLRequest::HTTP_POST, new FileInjector(filename), responder, timeout);
@@ -422,7 +426,28 @@ void LLHTTPClient::postFile(const std::string& url, const LLUUID& uuid,
{
request(url, LLURLRequest::HTTP_POST, new VFileInjector(uuid, asset_type), responder, timeout);
}
-#endif
+
+// static
+void LLHTTPClient::del(
+ const std::string& url,
+ ResponderPtr responder,
+ const F32 timeout)
+{
+ request(url, LLURLRequest::HTTP_DELETE, NULL, responder, timeout);
+}
+
+// static
+void LLHTTPClient::move(
+ const std::string& url,
+ const std::string& destination,
+ ResponderPtr responder,
+ const F32 timeout)
+{
+ LLSD headers;
+ headers["Destination"] = destination;
+ request(url, LLURLRequest::HTTP_MOVE, NULL, responder, timeout, headers);
+}
+
void LLHTTPClient::setPump(LLPumpIO& pump)
{