diff options
author | rider <rider@lindenlab.com> | 2015-10-01 12:36:52 -0700 |
---|---|---|
committer | rider <rider@lindenlab.com> | 2015-10-01 12:36:52 -0700 |
commit | ca81b19e80d0e0301b08bad9bd32ada937dea10d (patch) | |
tree | 86e33382a19aa9b9f1555b8987a1a6b511b8cbe5 /indra/llcorehttp/httpheaders.cpp | |
parent | 17ff449ae6b2759f212daa4fd3de0a7ea2664866 (diff) | |
parent | 4334fd27e2215c1bfad3aa7ab7130b8c6b289de5 (diff) |
Merge for Xcode 7
Diffstat (limited to 'indra/llcorehttp/httpheaders.cpp')
-rwxr-xr-x | indra/llcorehttp/httpheaders.cpp | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/indra/llcorehttp/httpheaders.cpp b/indra/llcorehttp/httpheaders.cpp index 23ebea361c..f586191a7c 100755 --- a/indra/llcorehttp/httpheaders.cpp +++ b/indra/llcorehttp/httpheaders.cpp @@ -34,7 +34,6 @@ namespace LLCore HttpHeaders::HttpHeaders() - : RefCounted(true) {} @@ -105,7 +104,7 @@ void HttpHeaders::appendNormal(const char * header, size_t size) // Find from end to simulate a tradition of using single-valued // std::map for this in the past. -const std::string * HttpHeaders::find(const char * name) const +const std::string * HttpHeaders::find(const std::string &name) const { const_reverse_iterator iend(rend()); for (const_reverse_iterator iter(rbegin()); iend != iter; ++iter) @@ -118,6 +117,24 @@ const std::string * HttpHeaders::find(const char * 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() |