info: add INFO_HTTP_FORBIDDEN http code
authorFerry Huberts <ferry.huberts@pelagic.nl>
Fri, 15 Apr 2016 07:57:59 +0000 (09:57 +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 0fef622..ea8dcdc 100644 (file)
@@ -53,6 +53,7 @@
 /* Response types */
 #define INFO_HTTP_OK                       (200)
 #define INFO_HTTP_NOCONTENT                (204)
+#define INFO_HTTP_FORBIDDEN                (403)
 #define INFO_HTTP_NOTFOUND                 (404)
 #define INFO_HTTP_REQUEST_ENTITY_TOO_LARGE (413)
 #define INFO_HTTP_INTERNAL_SERVER_ERROR    (500)
@@ -66,6 +67,9 @@ static INLINE const char * httpStatusToReply(unsigned int status) {
     case INFO_HTTP_NOCONTENT:
       return "204 No Content";
 
+    case INFO_HTTP_FORBIDDEN:
+      return "403 Forbidden";
+
     case INFO_HTTP_NOTFOUND:
       return "404 Not Found";