commit f0fecd1b5e816bbed5f45778dc1abd3148e4d698
parent 24a2913c4e1cb31a5cff52047beae146959d50b0
Author: Evgeny Grin (Karlson2k) <k2k@drgrin.dev>
Date: Thu, 29 Oct 2026 21:09:54 +0100
Added a sentinel to enum MHD_HTTP_StatusCode
Added a sentinel equal to the highest three-digit status code accepted
by MHD. This makes the full range accepted by the response API
representable by the enum in C++ without introducing a four-digit value.
Reported by Sami Jawhar on the mailing list.
Diffstat:
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/src/include/microhttpd2.h b/src/include/microhttpd2.h
@@ -5989,6 +5989,15 @@ enum MHD_FIXED_ENUM_APP_SET_ MHD_HTTP_StatusCode
/* 509 "Bandwidth Limit Exceeded". Apache extension. */
MHD_HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED = 509
+ ,
+
+
+ /**
+ * The sentinel value.
+ * This value enforces specific underlying integer type for the enum.
+ * Do not use.
+ */
+ MHD_HTTP_STATUS_SENTINEL = 999
};
diff --git a/src/include/microhttpd2_main.h.in b/src/include/microhttpd2_main.h.in
@@ -930,6 +930,15 @@ enum MHD_FIXED_ENUM_APP_SET_ MHD_HTTP_StatusCode
/* 509 "Bandwidth Limit Exceeded". Apache extension. */
MHD_HTTP_STATUS_BANDWIDTH_LIMIT_EXCEEDED = 509
+ ,
+
+
+ /**
+ * The sentinel value.
+ * This value enforces specific underlying integer type for the enum.
+ * Do not use.
+ */
+ MHD_HTTP_STATUS_SENTINEL = 999
};