From 0fe5d5fa1fdf9d417a3aa4659dbbeb38759f18c0 Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Sat, 5 May 2018 08:05:53 +0000 Subject: [PATCH] Fix: Added missing status codes to header generator --- src/util.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util.c b/src/util.c index a8c6e7a2..b0d7586d 100644 --- a/src/util.c +++ b/src/util.c @@ -715,9 +715,15 @@ ssize_t util_http_build_header(char * out, size_t len, ssize_t offset, case 401: statusmsg = "Authentication Required"; break; case 403: statusmsg = "Forbidden"; break; case 404: statusmsg = "File Not Found"; break; + case 405: statusmsg = "Method Not Allowed"; break; + case 409: statusmsg = "Conflict"; break; + case 415: statusmsg = "Unsupported Media Type"; break; case 416: statusmsg = "Request Range Not Satisfiable"; break; case 426: statusmsg = "Upgrade Required"; http_version = "1.1"; break; + case 429: statusmsg = "Too Many Requests"; break; + /* case of 500 is handled differently. No need to list it here. -- ph3-der-loewe, 2018-05-05 */ case 501: statusmsg = "Unimplemented"; break; + case 503: statusmsg = "Service Unavailable"; break; default: statusmsg = "(unknown status code)"; break; } }