diff options
author | Leah Neukirchen <leah@vuxu.org> | 2020-05-08 20:02:54 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-05-08 20:02:54 +0200 |
commit | 3bf2bd8ed6ca78cc91f27a4748f2e9bbe624a300 (patch) | |
tree | ca49915f9876cba677ec6957233614cc0062884b | |
parent | 992f7d6c3a1df7c351dfebba636832d0a7858dc9 (diff) | |
download | hittpd-3bf2bd8ed6ca78cc91f27a4748f2e9bbe624a300.tar.gz hittpd-3bf2bd8ed6ca78cc91f27a4748f2e9bbe624a300.tar.xz hittpd-3bf2bd8ed6ca78cc91f27a4748f2e9bbe624a300.zip |
detect and report ENAMETOOLONG
-rw-r--r-- | hittpd.c | 2 |
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"); |