X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmessage.cpp;h=2b3e40b539d9208138153d6401d453e17a590cee;hb=c8df43e7794dc82d5604dfa612e464bbc5ca3cdd;hp=c9638d0a05b3d938e0cb6b876df59fa80686e901;hpb=7b84e8b9d560e868f7fafbc18a2770579ee1b4b3;p=libs%2Fnet.git diff --git a/source/message.cpp b/source/message.cpp index c9638d0..2b3e40b 100644 --- a/source/message.cpp +++ b/source/message.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include "message.h" @@ -26,11 +27,7 @@ bool Message::has_header(const string &hdr) const 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)