info: add INFO_HTTP_INTERNAL_SERVER_ERROR http code
authorFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 15 Apr 2016 07:05:36 +0000 (09:05 +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 b554648..0fef622 100644 (file)
@@ -55,6 +55,7 @@
 #define INFO_HTTP_NOCONTENT                (204)
 #define INFO_HTTP_NOTFOUND                 (404)
 #define INFO_HTTP_REQUEST_ENTITY_TOO_LARGE (413)
+#define INFO_HTTP_INTERNAL_SERVER_ERROR    (500)
 
 void http_header_build(const char * plugin_name, unsigned int status, const char *mime, struct autobuf *abuf, int *contentLengthIndex);
 
@@ -72,8 +73,11 @@ static INLINE const char * httpStatusToReply(unsigned int status) {
       return "413 Request Entity Too Large";
 
     case INFO_HTTP_OK:
-    default:
       return "200 OK";
+
+    case INFO_HTTP_INTERNAL_SERVER_ERROR:
+    default:
+      return "500 Internal Server Error";
   }
 }