|
@@ -94,10 +94,17 @@ const std::string& HttpHeader::getFirst(const std::string& name) const {
|
|
|
|
|
|
std::deque<std::string> HttpHeader::get(const std::string& name) const {
|
|
|
std::deque<std::string> v;
|
|
|
+
|
|
|
std::string n(Util::toLower(name));
|
|
|
- for(std::multimap<std::string, std::string>::const_iterator i = table.find(n);
|
|
|
- i != table.end() && (*i).first == n; ++i) {
|
|
|
- v.push_back((*i).second);
|
|
|
+
|
|
|
+ std::multimap<std::string, std::string>::const_iterator first =
|
|
|
+ table.lower_bound(n);
|
|
|
+ std::multimap<std::string, std::string>::const_iterator last =
|
|
|
+ table.upper_bound(n);
|
|
|
+
|
|
|
+ while(first != last) {
|
|
|
+ v.push_back((*first).second);
|
|
|
+ ++first;
|
|
|
}
|
|
|
return v;
|
|
|
}
|