| 591 | } |
| 592 | |
| 593 | Headers::size_type |
| 594 | Headers::count(const char *key, int length) |
| 595 | { |
| 596 | size_type ret_count = 0; |
| 597 | size_t len = (length < 0) ? strlen(key) : length; |
| 598 | for (header_field_iterator it = begin(); it != end(); ++it) { |
| 599 | HeaderFieldName nm = (*it).name(); |
| 600 | if ((nm.length() == len) && (::strncasecmp(nm.c_str(), key, len) == 0)) { |
| 601 | ret_count++; |
| 602 | } |
| 603 | } |
| 604 | return ret_count; |
| 605 | } |
| 606 | |
| 607 | Headers::size_type |
| 608 | Headers::count(const std::string &key) |