Body-bearing methods (POST/PUT/PATCH) now reject: - missing Content-Length → 411 - malformed Content-Length → 400 - non-identity Transfer-Encoding (chunked, etc.) → 411 - declared length > maxBytes → 413 (unchanged) GET/HEAD/DELETE/OPTIONS/TRACE pass through unchanged. Consumers needing the legacy fail-open behaviour pass `requireContentLength = false`. Bump to 0.3.3 (behaviour tightening — consumers on default ctor see new 411/400 responses on requests that previously sailed through). Closes #4 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
15 lines
675 B
CMake
15 lines
675 B
CMake
# Minimal test harness for oatpp-authkit.
|
|
#
|
|
# Adds plain executable tests linked against the INTERFACE library and oatpp.
|
|
# No third-party test framework — assertions use <cassert> and a tiny REQUIRE
|
|
# macro so the suite stays portable and dependency-free.
|
|
|
|
find_package(oatpp REQUIRED)
|
|
|
|
add_executable(test_negotiation test_negotiation.cpp)
|
|
target_link_libraries(test_negotiation PRIVATE oatpp::authkit oatpp::oatpp)
|
|
add_test(NAME negotiation COMMAND test_negotiation)
|
|
|
|
add_executable(test_body_size_limit test_body_size_limit.cpp)
|
|
target_link_libraries(test_body_size_limit PRIVATE oatpp::authkit oatpp::oatpp)
|
|
add_test(NAME body_size_limit COMMAND test_body_size_limit)
|