Add include_httplib.cc to the main test executable (already done in
Makefile), and add include_windows_h.cc to the main test executable on
Windows to test if including windows.h conflicts with httplib.h.
RFC-9110 '14.1.2. Byte Ranges':
A client can limit the number of bytes requested without knowing the
size of the selected representation. If the last-pos value is absent,
or if the value is greater than or equal to the current length of the
representation data, the byte range is interpreted as the remainder of
the representation (i.e., the server replaces the value of last-pos
with a value that is one less than the current length of the selected
representation).
https://www.rfc-editor.org/rfc/rfc9110.html#section-14.1.2-6
The testsuite checks for the exact size of the compressed content. The
exact size can change if the zlib library is using a different strategy.
In thise case using zlib-ng results in a slightly larger content leading
to a failure in the test.
Check that the compressed content is less than 10MiB which is a tenth of
the orignal content and proves that compression works.
Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
* build(meson): bump minimum version to 0.62.0
This allows making some minor cleanups
* test(meson): fix SSLClientServerTest.* tests with OpenSSL 3.2.0
Since OpenSSL commit
<342e3652c7>,
the default X.509 certificate format generated with the `openssl req`
command has been changed to X.509 v3 from X.509 v1.
For some reason, this change breaks cpp-httplib's SSLClientServerTest.*
tests.
To fix the test failures, this patch passes the '-x509v1' flag instead
of '-x509' when OpenSSL 3.2.0 or newer is detected. To detect the
version of a command line utility, Meson 0.62.0 or later is required.
Fixes <https://github.com/yhirose/cpp-httplib/issues/1798>, but only for
the Meson build system.