mirror of
https://github.com/KingDuckZ/kamokan.git
synced 2025-07-02 14:04:16 +00:00
Assign the actual numbers to the HTTP status codes enum.
This allows me to get rid of a good deal of crap.
This commit is contained in:
parent
4eb4261f4a
commit
aaa28d3454
5 changed files with 28 additions and 72 deletions
|
@ -240,13 +240,13 @@ namespace tawashi {
|
|||
return HttpHeader(HttpHeader::Location, parCode, oss.str());
|
||||
}
|
||||
|
||||
HttpHeader Response::make_error_redirect (uint16_t parCode, ErrorReasons parReason) {
|
||||
HttpHeader Response::make_error_redirect (HttpStatusCodes parCode, ErrorReasons parReason) {
|
||||
auto statuslog = spdlog::get("statuslog");
|
||||
assert(statuslog);
|
||||
statuslog->info("Redirecting to error page, code={} reason={}", parCode, parReason);
|
||||
|
||||
std::ostringstream oss;
|
||||
oss << "error.cgi?code=" << parCode << "&reason=" << parReason._to_integral();
|
||||
return make_redirect(int_to_status_code(parCode), oss.str());
|
||||
return make_redirect(parCode, oss.str());
|
||||
}
|
||||
} //namespace tawashi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue