headers are now always lower case
This commit is contained in:
parent
0fbc5bad52
commit
64739c39d8
2 changed files with 50 additions and 47 deletions
|
|
@ -62,7 +62,7 @@ namespace Crafter {
|
|||
return std::format("{} {} HTTP/1.1\r\nConnection: keep-alive\r\nAccept-Encoding: identity\r\nContent-Length: 0\r\nHost: {}\r\n\r\n", method, route, host);
|
||||
}
|
||||
|
||||
export constexpr std::string CreateRequestHTTP(std::string method, std::string route, std::unordered_map<std::string, std::string> headers, std::string host) {
|
||||
export constexpr std::string CreateRequestHTTP(std::string method, std::string route, std::string host, std::unordered_map<std::string, std::string> headers) {
|
||||
std::string headersString;
|
||||
for (auto const& [key, val] : headers) {
|
||||
headersString+=std::format("{}: {}\r\n", key, val);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue