summaryrefslogtreecommitdiff
path: root/indra/llmessage/llhttpclient.cpp
diff options
context:
space:
mode:
authorJosh Bell <josh@lindenlab.com>2008-02-14 01:45:59 +0000
committerJosh Bell <josh@lindenlab.com>2008-02-14 01:45:59 +0000
commit98fd90ddd6595f2ee7e626c14117f51def621ec5 (patch)
tree9a9caf8bffa53b753fe850f445bd133195e9bb03 /indra/llmessage/llhttpclient.cpp
parent89d938efe371645756240da72f4c359c36985060 (diff)
svn merge -r 79730:79944 svn+ssh://svn.lindenlab.com/svn/linden/branches/parcel_media/sl-parcelmedia-6 --> release
QAR-275 Parcel Media Sam made me do it.
Diffstat (limited to 'indra/llmessage/llhttpclient.cpp')
-rw-r--r--indra/llmessage/llhttpclient.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/llmessage/llhttpclient.cpp b/indra/llmessage/llhttpclient.cpp
index 9f6115a0e4..23295476ff 100644
--- a/indra/llmessage/llhttpclient.cpp
+++ b/indra/llmessage/llhttpclient.cpp
@@ -38,6 +38,7 @@
#include "llurlrequest.h"
#include "llbufferstream.h"
#include "llsdserialize.h"
+#include "llsdutil.h"
#include "llvfile.h"
#include "llvfs.h"
#include "lluri.h"
@@ -112,7 +113,11 @@ void LLHTTPClient::Responder::completed(
}
}
+// virtual
+void LLHTTPClient::Responder::completedHeader(U32 status, const std::string& reason, const LLSD& content)
+{
+}
namespace
{
class LLHTTPClientURLAdaptor : public LLURLRequestComplete
@@ -140,13 +145,19 @@ namespace
if (mResponder.get())
{
mResponder->completedRaw(mStatus, mReason, channels, buffer);
+ mResponder->completedHeader(mStatus, mReason, mHeaderOutput);
}
}
+ virtual void header(const std::string& header, const std::string& value)
+ {
+ mHeaderOutput[header] = value;
+ }
private:
LLHTTPClient::ResponderPtr mResponder;
U32 mStatus;
std::string mReason;
+ LLSD mHeaderOutput;
};
class Injector : public LLIOPipe
@@ -340,11 +351,18 @@ void LLHTTPClient::get(const std::string& url, ResponderPtr responder, const LLS
{
request(url, LLURLRequest::HTTP_GET, NULL, responder, headers, timeout);
}
-
+void LLHTTPClient::getHeaderOnly(const std::string& url, ResponderPtr responder, const LLSD& headers, const F32 timeout)
+{
+ request(url, LLURLRequest::HTTP_HEAD, NULL, responder, headers, timeout);
+}
void LLHTTPClient::get(const std::string& url, ResponderPtr responder, const F32 timeout)
{
get(url, responder, LLSD(), timeout);
}
+void LLHTTPClient::getHeaderOnly(const std::string& url, ResponderPtr responder, const F32 timeout)
+{
+ getHeaderOnly(url, responder, LLSD(), timeout);
+}
void LLHTTPClient::get(const std::string& url, const LLSD& query, ResponderPtr responder, const LLSD& headers, const F32 timeout)
{