fixes
This commit is contained in:
parent
64739c39d8
commit
9bdf133d0f
12 changed files with 301 additions and 168 deletions
|
|
@ -35,7 +35,7 @@ namespace Crafter {
|
|||
};
|
||||
|
||||
export constexpr std::string CreateResponseHTTP(std::string status) {
|
||||
return std::format("HTTP/1.1 {}\r\nConnection: keep-alive\r\n\r\n", status);
|
||||
return std::format("HTTP/1.1 {}\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n", status);
|
||||
}
|
||||
|
||||
export constexpr std::string CreateResponseHTTP(std::string status, std::unordered_map<std::string, std::string> headers) {
|
||||
|
|
@ -43,7 +43,7 @@ namespace Crafter {
|
|||
for (auto const& [key, val] : headers) {
|
||||
headersString+=std::format("{}: {}\r\n", key, val);
|
||||
}
|
||||
return std::format("HTTP/1.1 {}\r\nConnection: keep-alive\r\n{}\r\n", status, headersString);
|
||||
return std::format("HTTP/1.1 {}\r\nConnection: keep-alive\r\nContent-Length: 0\r\n{}\r\n", status, headersString);
|
||||
}
|
||||
|
||||
export constexpr std::string CreateResponseHTTP(std::string status, std::string body) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue