#include <cstdlib>
+#include <msp/core/maputils.h>
#include <msp/strings/formatter.h>
#include <msp/strings/utils.h>
#include "message.h"
const string &Message::get_header(const string &hdr) const
{
- HeaderMap::const_iterator i = headers.find(normalize_header_name(hdr));
- if(i==headers.end())
- throw KeyError("Undefined header", hdr);
-
- return i->second;
+ return get_item(headers, normalize_header_name(hdr));
}
void Message::add_content(const string &d)