Skip to content
This repository has been archived by the owner on Jun 30, 2021. It is now read-only.

fix issue #67 #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/served/response.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/served/response.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ namespace served {
class response
{
typedef std::tuple<std::string, std::string> header_pair;
typedef std::map<std::string, header_pair> header_list;
typedef std::multimap<std::string, header_pair> header_list;

int _status;
header_list _headers;
Expand Down