diff options
| author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-05-10 16:09:25 +0300 |
|---|---|---|
| committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-05-10 16:09:25 +0300 |
| commit | b1243c55e5579f72e3dd9dafe2b53173349a047f (patch) | |
| tree | 9d9e0b018059483973a8e6f76644b0875d2534a3 /indra/llcorehttp/httpheaders.cpp | |
| parent | 042930b59a82f706f16e4b67a683697aed65112f (diff) | |
| parent | 7f5e6cea124e1193b199a3eabd50bdab96340c13 (diff) | |
Merged in oz_linden/maint-5974
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() |
