info: add INFO_HTTP_SERVICE_UNAVAILABLE http code
authorFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 15 Apr 2016 08:42:59 +0000 (10:42 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 15 Apr 2016 09:59:49 +0000 (11:59 +0200)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
lib/info/http_headers.h

index ea8dcdc..496dfbe 100644 (file)
@@ -57,6 +57,7 @@
 #define INFO_HTTP_NOTFOUND                 (404)
 #define INFO_HTTP_REQUEST_ENTITY_TOO_LARGE (413)
 #define INFO_HTTP_INTERNAL_SERVER_ERROR    (500)
+#define INFO_HTTP_SERVICE_UNAVAILABLE      (503)
 
 void http_header_build(const char * plugin_name, unsigned int status, const char *mime, struct autobuf *abuf, int *contentLengthIndex);
 
@@ -76,6 +77,9 @@ static INLINE const char * httpStatusToReply(unsigned int status) {
     case INFO_HTTP_REQUEST_ENTITY_TOO_LARGE:
       return "413 Request Entity Too Large";
 
+    case INFO_HTTP_SERVICE_UNAVAILABLE:
+      return "503 Service Unavailable";
+
     case INFO_HTTP_OK:
       return "200 OK";