Skip to content

Commit bbf98f1

Browse files
committed
squash! server : use httplib status codes
Fix mistake when setting status code to 503.
1 parent 9779626 commit bbf98f1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/server/server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3516,7 +3516,7 @@ int main(int argc, char ** argv) {
35163516
auto tmp = string_split<std::string>(req.path, '.');
35173517
if (req.path == "/" || tmp.back() == "html") {
35183518
res.set_content(reinterpret_cast<const char*>(loading_html), loading_html_len, "text/html; charset=utf-8");
3519-
res.status = res.status == httplib::StatusCode::ServiceUnavailable_503;
3519+
res.status = httplib::StatusCode::ServiceUnavailable_503;
35203520
} else {
35213521
res_error(res, format_error_response("Loading model", ERROR_TYPE_UNAVAILABLE));
35223522
}

0 commit comments

Comments
 (0)