diff options
Diffstat (limited to 'http/http_connection.hpp')
-rw-r--r-- | http/http_connection.hpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/http/http_connection.hpp b/http/http_connection.hpp index d0aa5d5be4..e02c518ebb 100644 --- a/http/http_connection.hpp +++ b/http/http_connection.hpp @@ -38,9 +38,8 @@ namespace crow // NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables) static int connectionCount = 0; -// request body limit size set by the bmcwebHttpReqBodyLimitMb option -constexpr uint64_t httpReqBodyLimit = 1024UL * 1024UL * - bmcwebHttpReqBodyLimitMb; +// request body limit size set by the BMCWEB_HTTP_BODY_LIMIT option +constexpr uint64_t httpReqBodyLimit = 1024UL * 1024UL * BMCWEB_HTTP_BODY_LIMIT; constexpr uint64_t loggedOutPostBodyLimit = 4096U; @@ -70,9 +69,10 @@ class Connection : { initParser(); -#ifdef BMCWEB_ENABLE_MUTUAL_TLS_AUTHENTICATION - prepareMutualTls(); -#endif // BMCWEB_ENABLE_MUTUAL_TLS_AUTHENTICATION + if constexpr (BMCWEB_MUTUAL_TLS_AUTH) + { + prepareMutualTls(); + } connectionCount++; @@ -187,7 +187,7 @@ class Connection : void afterSslHandshake() { // If http2 is enabled, negotiate the protocol - if constexpr (bmcwebEnableHTTP2) + if constexpr (BMCWEB_EXPERIMENTAL_HTTP2) { const unsigned char* alpn = nullptr; unsigned int alpnlen = 0; |