summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--hittpd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hittpd.c b/hittpd.c
index afee1ac..a415186 100644
--- a/hittpd.c
+++ b/hittpd.c
@@ -580,6 +580,8 @@ on_message_complete(http_parser *p) {
 			send_error(p, 403, "Forbidden");
 		else if (errno == ENOENT || errno == ENOTDIR)
 			send_error(p, 404, "Not Found");
+		else if (errno == ENAMETOOLONG)
+			send_error(p, 413, "Payload Too Large");
 		else {
 			perror("open");
 			send_error(p, 500, "Internal Server Error");