info: add INFO_HTTP_REQUEST_ENTITY_TOO_LARGE http code
authorFerry Huberts <ferry.huberts@pelagic.nl>
Thu, 14 Apr 2016 23:17:59 +0000 (01:17 +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 4d2b901..b554648 100644 (file)
 #define INFO_HTTP_VERSION "HTTP/1.1"
 
 /* Response types */
-#define INFO_HTTP_OK             (200)
-#define INFO_HTTP_NOCONTENT      (204)
-#define INFO_HTTP_NOTFOUND       (404)
+#define INFO_HTTP_OK                       (200)
+#define INFO_HTTP_NOCONTENT                (204)
+#define INFO_HTTP_NOTFOUND                 (404)
+#define INFO_HTTP_REQUEST_ENTITY_TOO_LARGE (413)
 
 void http_header_build(const char * plugin_name, unsigned int status, const char *mime, struct autobuf *abuf, int *contentLengthIndex);
 
@@ -67,6 +68,9 @@ static INLINE const char * httpStatusToReply(unsigned int status) {
     case INFO_HTTP_NOTFOUND:
       return "404 Not Found";
 
+    case INFO_HTTP_REQUEST_ENTITY_TOO_LARGE:
+      return "413 Request Entity Too Large";
+
     case INFO_HTTP_OK:
     default:
       return "200 OK";