summaryrefslogtreecommitdiff
path: root/indra/llcorehttp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2015-05-20 17:37:27 -0700
committerRider Linden <rider@lindenlab.com>2015-05-20 17:37:27 -0700
commitc437a9c4ec865c38366c8057010d24311888ecb1 (patch)
treed505cbcd4d1455b309689d170b24485a3ff94087 /indra/llcorehttp
parenta4741cecb2112f418c1d98ca63a261e707a856c3 (diff)
Webprofile converted to coroutine.
Added JSON->LLSD converter Added corohandler for JSON data
Diffstat (limited to 'indra/llcorehttp')
-rwxr-xr-xindra/llcorehttp/httpheaders.cpp18
-rwxr-xr-xindra/llcorehttp/httpheaders.h6
2 files changed, 23 insertions, 1 deletions
diff --git a/indra/llcorehttp/httpheaders.cpp b/indra/llcorehttp/httpheaders.cpp
index 73c92c8f10..e03b1b080d 100755
--- a/indra/llcorehttp/httpheaders.cpp
+++ b/indra/llcorehttp/httpheaders.cpp
@@ -118,6 +118,24 @@ const std::string * HttpHeaders::find(const std::string &name) const
return NULL;
}
+void HttpHeaders::remove(const char *name)
+{
+ remove(std::string(name));
+}
+
+void HttpHeaders::remove(const std::string &name)
+{
+ iterator iend(end());
+ for (iterator iter(begin()); iend != iter; ++iter)
+ {
+ if ((*iter).first == name)
+ {
+ mHeaders.erase(iter);
+ return;
+ }
+ }
+}
+
// Standard Iterators
HttpHeaders::iterator HttpHeaders::begin()
diff --git a/indra/llcorehttp/httpheaders.h b/indra/llcorehttp/httpheaders.h
index 940f92183c..51bd76a01d 100755
--- a/indra/llcorehttp/httpheaders.h
+++ b/indra/llcorehttp/httpheaders.h
@@ -146,13 +146,17 @@ public:
// a pointer to a std::string in the container.
// Pointer is valid only for the lifetime of
// the container or until container is modifed.
-
const std::string * find(const std::string &name) const;
const std::string * find(const char * name) const
{
return find(std::string(name));
}
+ // Remove the header from the list if found.
+ //
+ void remove(const std::string &name);
+ void remove(const char *name);
+
// Count of headers currently in the list.
size_type size() const
{