From 3bf2bd8ed6ca78cc91f27a4748f2e9bbe624a300 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Fri, 8 May 2020 20:02:54 +0200 Subject: detect and report ENAMETOOLONG --- hittpd.c | 2 ++ 1 file changed, 2 insertions(+) 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"); -- cgit 1.4.1