From fa3025f4d7a27bf9e821266253edacc5c53ddbe0 Mon Sep 17 00:00:00 2001 From: benno Date: Sat, 23 Oct 2021 15:30:28 +0000 Subject: [PATCH] annotate a 413 error with "request body too large" in the error log. ok claudio@ --- usr.sbin/httpd/server_http.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/httpd/server_http.c b/usr.sbin/httpd/server_http.c index 153829f4201..696a03ddfaa 100644 --- a/usr.sbin/httpd/server_http.c +++ b/usr.sbin/httpd/server_http.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server_http.c,v 1.145 2021/10/22 08:51:50 benno Exp $ */ +/* $OpenBSD: server_http.c,v 1.146 2021/10/23 15:30:28 benno Exp $ */ /* * Copyright (c) 2020 Matthias Pressfreund @@ -1406,7 +1406,7 @@ server_response(struct httpd *httpd, struct client *clt) if (clt->clt_toread > 0 && (size_t)clt->clt_toread > srv_conf->maxrequestbody) { - server_abort_http(clt, 413, NULL); + server_abort_http(clt, 413, "request body too large"); return (-1); } -- 2.20.1