54 Commits

Author SHA1 Message Date
Florian Albrechtskirchinger
22d90c29b4
Remove select() and use poll() (#2078)
* Revert "Fix typo in meson.build (#2070)"

This reverts commit 5c0135fa5d7e059f5dd4c3a1a8a2d767d30ac491.

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

This reverts commit 2b5d1eea8d7e9f881ac4be04ce31df782b26b6a9.

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

This reverts commit 6e73a63153e936e753211a5608acf336fb848a37.

* Remove select() and use poll()
2025-02-20 18:51:35 -05:00
yhirose
321a86d9f2 Add *.dSYM to Makefile clean 2025-02-18 05:56:22 -05:00
Florian Albrechtskirchinger
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
Florian Albrechtskirchinger
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
yhirose
39a64fb4e7 Fix ABI compatibility tool on macOS 2025-02-11 18:40:39 -05:00
yhirose
d7c14b6f3a Add API compatibility check tool 2025-02-11 17:49:33 -05:00
yhirose
c239087332 Fix Mafile errors 2024-09-17 18:37:44 -04:00
yhirose
4990b4b4b7 Fix problems with SSLSlientServerTest.* tests 2024-09-17 17:00:17 -04:00
yhirose
4c2a608a0c Fix GitHub Actions errors 2024-09-04 09:06:27 -04:00
Vladimír Chlup
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
Jiwoo Park
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
yhirose
548dfff0ae Fix #1793 2024-03-09 22:26:17 -05:00
yhirose
eba980846b
Fix #1628 (OpenSSL 1.1.1 End of Life on September 11, 2023) (#1745) 2023-12-24 08:20:58 -05:00
Sergey Kazmin
e62a4b02e5
fix (#1525)
Co-authored-by: Sergey Kazmin <sergey.kazmin@kaspersky.com>
2023-04-04 07:12:15 -07:00
Sergey Kazmin
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
yhirose
a5a62768c0
Fix #1292 (#1296) 2022-05-27 11:54:43 -04:00
Sebastien Blanchet
8191fd8e6c
Add optional private key password to SSLServer ctor (#1205) 2022-02-27 14:16:15 -05:00
yhirose
743ecbd365
Issue1121 (#1122)
* Fixed test/Makefile problem when cleaning *.pem files

* Fix #1121
2021-12-11 19:07:12 -05:00
yhirose
226388ae27 Resolve #1100 2021-11-23 10:47:30 -05:00
yhirose
90a291214c Update Makefile 2021-11-15 23:08:49 -05:00
yhirose
c384be02c9 Fixed GitHub Actions build error 2021-10-14 10:52:05 -04:00
yhirose
d17ac3bb40 Fix "Issue 39922 in oss-fuzz: cpp-httplib:server_fuzzer: Timeout in server_fuzzer" 2021-10-14 08:55:29 -04:00
Joel Rosdahl
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
Gregor Jasny
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
yhirose
401de608df Fixed debug option problem. 2020-11-05 00:20:59 -05:00
Daniel Ottiger
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
Omkar Jadhav
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
yhirose
7e8db1dc68 Comment out -fsanitize=address 2020-10-08 23:14:53 -04:00
Omkar Jadhav
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
yhirose
8a348f17fd Resolved #192 2020-07-30 01:47:54 -04:00
yhirose
12540fe8d3 Brotli support on client 2020-07-25 20:44:02 -04:00
yhirose
c74129a1c2
Fix #372 (#374) 2020-03-09 23:59:00 -04:00
yhirose
5675cad407 Added proxy test in Makefile 2019-12-22 21:07:26 -05:00
yhirose
38adeaf02c Fixed problem with proxy support and added unit tests 2019-12-22 15:37:01 -05:00
yhirose
e4fd9f19ca Updated Makefile 2019-10-23 08:28:15 -04:00
yhirose
3541fe8330 Use -pthread 2019-07-09 22:31:55 -04:00
yhirose
cdc45c4601 Changed to use CXX and CXXFLAGS in Makefile 2019-06-26 15:09:34 -04:00
PixlRainbow
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
PixlRainbow
b2f4120d15 setup test cases for client certificates 2019-06-07 01:23:22 +08:00
yhirose
49c82c9c50 Fix #97. (Thanks to DJm00n.) 2018-10-28 16:15:22 +09:00
David Guillen Fandos
ca343ae1d8 Fix small issues in tests and added some extra checks. 2018-07-31 22:08:38 +02:00
yhirose
85a30e73a5 Fixed -lpthread linker option position 2018-06-14 15:30:55 +00:00
yhirose
312a8d7523 Removed HTTP version. It's now always 'HTTP/1.1'. 2018-05-13 19:18:25 -04:00
yhirose
1d5fbe6a5b Add gzip support. resolved #11 2017-12-30 00:00:43 -05:00
yhirose
7a87dd1039 Added -lpthread 2017-12-29 22:34:46 -05:00
yhirose
bb8a1df7a3 Fixed #21 2017-12-05 19:19:07 -05:00
yhirose
e90244e992 Fixed compiler warings (with -Wall and -Wextra) 2017-12-03 08:17:05 -05:00
yhirose
140e5c06fb Added example/benchmark.cc 2017-11-06 13:25:56 -05:00
yhirose
22f124f871 Added OpenSSL support. #5 2017-04-21 23:13:30 -04:00
yhirose
98e3e7b3c1 Changed test and README to use the generic lambda. 2014-03-31 21:07:56 -04:00