diff --git a/src/served/response.cpp b/src/served/response.cpp index fd37843..6cbd4f8 100644 --- a/src/served/response.cpp +++ b/src/served/response.cpp @@ -55,7 +55,7 @@ response::set_header(std::string const& header, std::string const& value) std::transform(header.begin(), header.end(), mut_header.begin(), ::tolower); - _headers[mut_header] = header_pair(header, value); + _headers.emplace(std::make_pair(mut_header, header_pair(header, value))); } void diff --git a/src/served/response.hpp b/src/served/response.hpp index e9dcb53..34aa029 100644 --- a/src/served/response.hpp +++ b/src/served/response.hpp @@ -47,7 +47,7 @@ namespace served { class response { typedef std::tuple header_pair; - typedef std::map header_list; + typedef std::multimap header_list; int _status; header_list _headers;