aboutsummaryrefslogtreecommitdiff
path: root/src/include/microhttpd.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/microhttpd.h')
-rw-r--r--src/include/microhttpd.h37
1 files changed, 26 insertions, 11 deletions
diff --git a/src/include/microhttpd.h b/src/include/microhttpd.h
index fcb617d8..02bf38ab 100644
--- a/src/include/microhttpd.h
+++ b/src/include/microhttpd.h
@@ -957,6 +957,11 @@ enum MHD_FLAG
957 * MHD, and OFF in production. 957 * MHD, and OFF in production.
958 */ 958 */
959 MHD_USE_PEDANTIC_CHECKS = 32, 959 MHD_USE_PEDANTIC_CHECKS = 32,
960#if 0 /* Will be marked for real deprecation later. */
961#define MHD_USE_PEDANTIC_CHECKS \
962 _MHD_DEPR_IN_MACRO("Flag MHD_USE_PEDANTIC_CHECKS is deprecated, use option MHD_OPTION_STRICT_FOR_CLIENT instead") \
963 32
964#endif /* 0 */
960 965
961 /** 966 /**
962 * Use `poll()` instead of `select()`. This allows sockets with `fd >= 967 * Use `poll()` instead of `select()`. This allows sockets with `fd >=
@@ -1136,16 +1141,7 @@ enum MHD_FLAG
1136 * This is combination of #MHD_USE_AUTO and #MHD_USE_INTERNAL_POLLING_THREAD 1141 * This is combination of #MHD_USE_AUTO and #MHD_USE_INTERNAL_POLLING_THREAD
1137 * flags. 1142 * flags.
1138 */ 1143 */
1139 MHD_USE_AUTO_INTERNAL_THREAD = MHD_USE_AUTO | MHD_USE_INTERNAL_POLLING_THREAD, 1144 MHD_USE_AUTO_INTERNAL_THREAD = MHD_USE_AUTO | MHD_USE_INTERNAL_POLLING_THREAD
1140
1141 /**
1142 * Be permissive about the protocol, allowing slight deviations that
1143 * are technically not allowed by the RFC.
1144 * Specifically, at the moment, this flag causes MHD to
1145 * allow spaces in header field names. This is
1146 * disallowed by the standard.
1147 */
1148 MHD_USE_PERMISSIVE_CHECKS = 131072
1149 1145
1150}; 1146};
1151 1147
@@ -1471,7 +1467,26 @@ enum MHD_OPTION
1471 * value is used. This option should be followed by an `unsigned int` 1467 * value is used. This option should be followed by an `unsigned int`
1472 * argument. 1468 * argument.
1473 */ 1469 */
1474 MHD_OPTION_LISTEN_BACKLOG_SIZE = 28 1470 MHD_OPTION_LISTEN_BACKLOG_SIZE = 28,
1471
1472 /**
1473 * If set to 1 - be strict about the protocol (as opposed to as
1474 * tolerant as possible). Specifically, at the moment, this flag
1475 * causes MHD to reject HTTP 1.1 connections without a "Host" header.
1476 * This is required by the standard, but of course in violation of
1477 * the "be as liberal as possible in what you accept" norm. It is
1478 * recommended to set this to 1 if you are testing clients against
1479 * MHD, and 0 in production.
1480 * if set to -1 - be opposite to strict and be permissive about the
1481 * protocol, allowing slight deviations that are technically not
1482 * allowed by the RFC. Specifically, at the moment, this flag
1483 * causes MHD to allow spaces in header field names. This is
1484 * disallowed by the standard.
1485 * It is not recommended to set it to -1 on publicly available
1486 * servers as it may potentially lower level of protection.
1487 * This option should be followed by an `int` argument.
1488 */
1489 MHD_OPTION_STRICT_FOR_CLIENT = 29
1475}; 1490};
1476 1491
1477 1492