Skip to content

Commit

Permalink
Fix bug of request header forwarding (#709)
Browse files Browse the repository at this point in the history
* Fix bug of request header forwarding

* Replace insert(make_pair()) with emplace()

---------

Co-authored-by: Tindy X <[email protected]>
  • Loading branch information
aylz10 and tindy2013 authored Apr 2, 2024
1 parent eef5328 commit be2de49
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/webserver_httplib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static httplib::Server::Handler makeHandler(const responseRoute &rr)
{
continue;
}
req.headers[h.first] = h.second;
req.headers.emplace(h.first.data(), h.second.data());
}
req.argument = request.params;
if (request.get_header_value("Content-Type") == "application/x-www-form-urlencoded")
Expand Down

0 comments on commit be2de49

Please sign in to comment.