1
0
mirror of synced 2025-07-20 16:02:59 +03:00
Commit Graph

62 Commits

Author SHA1 Message Date
145fc8b021 Proxy test (#2172)
* Add proxy test on CI

* Add Brotli and Zstd dev packages to proxy test workflow

* Fix Docker Compose command for GitHub Actions compatibility

* Add proxy readiness check and netcat dependency

* Use netcat-openbsd instead of virtual netcat package

* Add proxy startup delay and debug logging
2025-07-06 22:00:41 -04:00
9a0571513e Fix Makefile 2025-07-04 22:30:33 -04:00
292f9a6c55 Add CPPHTTPLIB_USE_NON_BLOCKING_GETADDRINFO 2025-06-30 21:14:58 -04:00
7c303bb871 Launch proxy server before proxy test 2025-06-29 00:17:19 -04:00
ea850cbfa7 Fix #1601 (#2167)
* Fix #1601

* clang-format

* Fix Windows problem

* Use GetAddrInfoEx on Windows

* Fix Windows problem

* Add getaddrinfo_a

* clang-format

* Adjust Benchmark Test

* Test

* Fix Bench test

* Fix build error

* Fix build error

* Fix Makefile

* Fix build error

* Fix buid error
2025-06-29 00:13:09 -04:00
c765584e6b Add zstd support (#2088)
* Add zstd support

* Add zstd to CI tests

* Use use zstd cmake target instead of ZSTD. Use cmake variable for found packages

* Add missing comment for HTTPLIB_REQUIRE_ZSTD

* Fix test.yaml rebase error

* Use zstd::libzstd target

* Add include and library paths to ZSTD args

* Run clang-format

* Add zstd to httplibConfig.cmake.in
2025-03-16 15:51:53 -04:00
94a4028821 Update vendored gtest to 1.12.1 (#2100)
Update googletest to the last version supporting C++11.
2025-03-12 12:16:27 -04:00
5a1ecc3958 Run 32-bit compiled unit tests on Ubuntu (#2095) 2025-03-06 21:17:41 -05:00
22d90c29b4 Remove select() and use poll() (#2078)
* Revert "Fix typo in meson.build (#2070)"

This reverts commit 5c0135fa5d.

* Revert "build(meson): automatically use poll or select as needed (#2067)"

This reverts commit 2b5d1eea8d.

* Revert "Make poll() the default (#2065)"

This reverts commit 6e73a63153.

* Remove select() and use poll()
2025-02-20 18:51:35 -05:00
321a86d9f2 Add *.dSYM to Makefile clean 2025-02-18 05:56:22 -05:00
6e73a63153 Make poll() the default (#2065)
* Make poll() the default

select() can still be enabled by defining CPPHTTPLIB_USE_SELECT.

* Run tests with select() and poll()
2025-02-18 05:23:23 -05:00
574f5ce93e Add style check to workflow (#2062)
* Add style check to workflow

* Add example files to style check
2025-02-17 12:14:53 -05:00
39a64fb4e7 Fix ABI compatibility tool on macOS 2025-02-11 18:40:39 -05:00
d7c14b6f3a Add API compatibility check tool 2025-02-11 17:49:33 -05:00
c239087332 Fix Mafile errors 2024-09-17 18:37:44 -04:00
4990b4b4b7 Fix problems with SSLSlientServerTest.* tests 2024-09-17 17:00:17 -04:00
4c2a608a0c Fix GitHub Actions errors 2024-09-04 09:06:27 -04:00
25b1e0d906 Tweak CI & fix macOS prefix (#1843)
* Use brew prefix or given one

* Polish CI workflow file
2024-05-26 08:24:29 -04:00
b8bafbc291 Generate missing PEMs for CTest (#1811)
* Generate missing PEMs

* Fix typo

* Copy files using simpler command
2024-04-05 13:50:21 -04:00
548dfff0ae Fix #1793 2024-03-09 22:26:17 -05:00
eba980846b Fix #1628 (OpenSSL 1.1.1 End of Life on September 11, 2023) (#1745) 2023-12-24 08:20:58 -05:00
e62a4b02e5 fix (#1525)
Co-authored-by: Sergey Kazmin <sergey.kazmin@kaspersky.com>
2023-04-04 07:12:15 -07:00
6d963fbe8d Support loading system certs from Keychein on MacOS (#1474)
* Support loading system certs from Keychein on MacOS

* review improvements: add deps to meson.build and improve conditional expressions in cmake

* fix tabs

* fix tabs

* review improvements

* fix after review

* additionally load root certs from the system root keychain

* cmake fix

* fix

* small refactoring

* small refactoring

---------

Co-authored-by: Sergey Kazmin <sergey.kazmin@kaspersky.com>
2023-02-17 12:06:55 -05:00
a5a62768c0 Fix #1292 (#1296) 2022-05-27 11:54:43 -04:00
8191fd8e6c Add optional private key password to SSLServer ctor (#1205) 2022-02-27 14:16:15 -05:00
743ecbd365 Issue1121 (#1122)
* Fixed test/Makefile problem when cleaning *.pem files

* Fix #1121
2021-12-11 19:07:12 -05:00
226388ae27 Resolve #1100 2021-11-23 10:47:30 -05:00
90a291214c Update Makefile 2021-11-15 23:08:49 -05:00
c384be02c9 Fixed GitHub Actions build error 2021-10-14 10:52:05 -04:00
d17ac3bb40 Fix "Issue 39922 in oss-fuzz: cpp-httplib:server_fuzzer: Timeout in server_fuzzer" 2021-10-14 08:55:29 -04:00
887074efd2 Add test of httplib.h split into .h + .cc (#1015)
In order to test the split version (.h + .cc via split.py):

- Added a test_split program in the test directory whose main purpose is
  to verify that it works to compile and link the test case code against
  the split httplib.h version.
- Moved types needed for test cases to the “header part” of httplib.h.
  Also added forward declarations of functions needed by test cases.
- Added an include_httplib.cc file which is linked together with test.cc
  to verify that inline keywords have not been forgotten.

The changes to httplib.h just move code around (or add forward
declarations), with one exception: detail::split and
detail::process_client_socket have been converted to non-template
functions (taking an std::function instead of using a type parameter for
the function) and forward-declared instead. This avoids having to move
the templates to the “header part”.
2021-07-31 09:53:30 -04:00
6b08babbd2 Use googletest 1.11.0 (#1000)
* Update googletest to version 1.11.0

* Fix test warnings
2021-07-17 13:21:03 -04:00
401de608df Fixed debug option problem. 2020-11-05 00:20:59 -05:00
6e1879dfae ssl-verify-host: fix verifying ip addresses containing zero's (#732)
* ssl-verify-host: fix verifying ip addresses containing zero's

If the subject alternate name contained an ip address with an zero
(like 10.42.0.1) it could not successfully verify.
It is because in c++ strings are null-terminated
and therefore strlen(name) would return a wrong result.
As I can not see why we can not trust the length returned by openssl,
lets drop this check.

* ssl-verify-host: add test case

lets try to validate against 127.0.0.1

Co-authored-by: Daniel Ottiger <daniel.ottiger@ch.schindler.com>
2020-11-02 20:27:34 -05:00
5292142046 Add cpp-httplib to oss-fuzz (#684)
* *Add server fuzzer target  and seed corpus
* Add fuzz_test option to Makefile

* Fix #685

* Try to fix Github actions on Ubuntu

* Added ReadTimeoutSSL test

* Comment out `-fsanitize=address`

* Rebase upstream changes

* remove address sanitizer temporarily

* Add separate Makefile for fuzzing

* 1. Remove special char from dictionary
2. Clean fuzzing/Makefile

* Use specific path to avoid accidently linking openssl version brought in by oss-fuzz

* remove addition of flags

* Refactor Makefile

* Add missing newline

* Add fuzztest to github workflow

* Fix

Co-authored-by: yhirose <yuji.hirose.bug@gmail.com>
2020-10-15 08:11:40 -04:00
7e8db1dc68 Comment out -fsanitize=address 2020-10-08 23:14:53 -04:00
143b2dd15a Fix memory leak due caused due to X509_STORE (#671)
* Fix memory leak due caused due to X509_STORE

* Add test for repro and address sanitizer to compiler flags

* Add comment

* Sync

* Associate ca_store with ssl context within set_ca_cert_store()

* Split SlowPost test

* Fix #674

Co-authored-by: yhirose <yuji.hirose.bug@gmail.com>
2020-10-02 13:17:37 -04:00
8a348f17fd Resolved #192 2020-07-30 01:47:54 -04:00
12540fe8d3 Brotli support on client 2020-07-25 20:44:02 -04:00
c74129a1c2 Fix #372 (#374) 2020-03-09 23:59:00 -04:00
5675cad407 Added proxy test in Makefile 2019-12-22 21:07:26 -05:00
38adeaf02c Fixed problem with proxy support and added unit tests 2019-12-22 15:37:01 -05:00
e4fd9f19ca Updated Makefile 2019-10-23 08:28:15 -04:00
3541fe8330 Use -pthread 2019-07-09 22:31:55 -04:00
cdc45c4601 Changed to use CXX and CXXFLAGS in Makefile 2019-06-26 15:09:34 -04:00
2d532a6d0c build fix for Mac OS X
removed c_rehash has it appears to not be needed
2019-06-07 01:39:03 +08:00
b2f4120d15 setup test cases for client certificates 2019-06-07 01:23:22 +08:00
49c82c9c50 Fix #97. (Thanks to DJm00n.) 2018-10-28 16:15:22 +09:00
ca343ae1d8 Fix small issues in tests and added some extra checks. 2018-07-31 22:08:38 +02:00
85a30e73a5 Fixed -lpthread linker option position 2018-06-14 15:30:55 +00:00