1
0
mirror of synced 2025-04-23 09:45:32 +03:00

1088 Commits

Author SHA1 Message Date
Andrea Pappacoda
c111c42a86
build(meson): feature args in pkg-config file (#1092)
Follow-up for #1090. The args are now also added to the pkg-config file.
2021-11-15 22:50:33 -05:00
yhirose
6fb5b63018
Fix #1093. Remove meson-build tests from GitHubActions (#1094) 2021-11-15 22:49:40 -05:00
yhirose
ec56dfa35e
Fix #1085 (#1091) 2021-11-15 14:37:10 -05:00
Andrea Pappacoda
943cd51b67
build(meson): pass feature args to dependency consumers (#1090)
Fixes #1087
2021-11-15 14:03:25 -05:00
Yuji Hirose
301faa074c Added test case for #1065 2021-10-29 07:29:23 -04:00
DavidKorczynski
dc0481e832
Add CIFuzz integration (#1079)
Signed-off-by: David Korczynski <david@adalogics.com>
2021-10-27 12:19:21 -04:00
zhenyolka
4f8fcdbaf7
Allow to specify server IP address (#1067)
* Allow to specify server IP address

* Reimplement in set_hostname_addr_map

* Add tests for set_hostname_addr_map

* Fix tests after implement set_hostname_addr_map

* SpecifyServerIPAddressTest.RealHostname typo
2021-10-16 15:05:55 -04:00
CarlosLeeGit
b80aa7fee3
support custom ssl ctx configuration for SSLServer (#1073) v0.9.7 2021-10-15 07:13:16 -04: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
yhirose
c7554ccac2
Fix #1069 (#1070) v0.9.6 2021-10-09 20:35:58 -04:00
yhirose
35ef1c7bae Fix #1063 2021-10-03 18:37:59 -04:00
David Pfahler
d87d0672a8
Split the header only if needed (#1060)
* Update split.py

* Update split.py

* Update split.py

* Update split.py
v0.9.5
2021-09-28 18:11:50 -04:00
estshorter
3da42fd1e8
Avoid min/max macro expansion on Windows (#1057) 2021-09-25 08:53:15 -04:00
yhirose
503aa61325 Fix problem with an empty parameter in set_base_dir 2021-09-20 17:40:05 -04:00
null
e4c276d0c2
doc: fix typo in README (#1056)
fixed typo in README.md, replacing `Sutudio` with `Studio`.
2021-09-18 11:33:23 -04:00
yhirose
e07f7691a8
Update README 2021-09-17 21:26:31 -04:00
yhirose
623ab4a96e Updated README regarding Visual Studio support 2021-09-17 11:36:08 -04:00
Zizheng Tai
e1efa337a2
Make Client move-constructible (#1051) 2021-09-16 14:05:42 -04:00
Andrea Pappacoda
549cdf2f7d
test: avoid infinite loop when IPV6 is unsupported (#1054) 2021-09-16 14:04:43 -04:00
yhirose
3c522386e9 Fix "Issue 38551 in oss-fuzz: cpp-httplib:server_fuzzer: Timeout in server_fuzze" 2021-09-12 19:24:48 -04:00
yhirose
c202aa9ce9
Read buffer support. (Fix #1023) (#1046) 2021-09-12 00:26:02 -04:00
Andrea Pappacoda
e3e28c6231
meson: add tests (#1044)
This integrates the "main" test suite (test/test.cc) in Meson.

This allows to run the tests in the CI with the Meson-built version of
the library to ensure that nothing breaks unexpectedly.

It also simplifies life of downstream packagers, that do not have to
write a custom build script to split the library and run tests but can
instead just let Meson do that for them.
2021-09-11 14:26:48 -04:00
yhirose
4e05368086 Fix #1054 2021-09-11 14:13:49 -04:00
yhirose
e1afe74fe2 Fix #1037 2021-09-10 22:42:14 -04:00
yhirose
461acb02f5 Comment out SlowPostFail test for now 2021-09-10 22:37:31 -04:00
Gregor Jasny
415edc237c
Set error variable for failed write_data (#1036) 2021-09-05 16:15:46 -04:00
Andrea Pappacoda
e20ecd2574
Full Meson support (#1033)
* Full Meson support
cpp-httplib can be now built with Meson even in compiled library mode.

The library is built with LTO, supports OpenSSL, zlib and Brotli,
and the build system also generates a pkg-config file when needed.

Compared to the CMake file this one is quite small (more than five times
smaller!), and maintaining it won't be an issue :)

* meson: automatic versioning
2021-09-04 11:33:53 -04:00
yhirose
ab477b5631 Fix "Issue 37742 in oss-fuzz: cpp-httplib:server_fuzzer: Timeout in server_fuzzer" v0.9.4 2021-09-02 22:57:57 -04:00
yhirose
0823d5c7f2 Fixed #1031 2021-08-30 17:16:31 -04:00
yhirose
1cc6930363 Append '_Online' suffix to Unit test names that access external servers v0.9.3 2021-08-23 13:02:19 -04:00
yhirose
4297500928 Fix #1024 2021-08-17 09:28:17 -04:00
Thomas Behn
a58f042614
Don't define INVALID_SOCKET if it has been defined already (i.e. by libpcap) (#1021)
Co-authored-by: Thomas Behn <Thomas.Behn@meinberg.de>
2021-08-10 08:29:27 -04:00
yhirose
469c6bc2b6 Fix #1017 2021-08-02 15:44:50 -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
Joel Rosdahl
9c2c15ca45
Add missing template method implementations (#1013)
When using the split version of httplib.h the templated implementation
of e.g. Client::set_connection_timeout ends up in httplib.cc and
therefore results in a linker error since the needed template
specialization has not been instantiated. Fix this by moving the
implementation of template methods into the part that ends up in
httplib.h after the split.

Fixes #1008.
2021-07-30 10:05:49 -04:00
Joel Rosdahl
1b3b098329
Avoid hardcoded ports in RedirectToDifferentPort.Redirect test (#1012)
The RedirectToDifferentPort.Redirect test assumes that port 8080 and
8081 are available on localhost. They aren’t on my system so the test
fails. Improve this by binding to available ports instead of hardcoded
ones.
2021-07-30 10:04:02 -04:00
Joel Rosdahl
6f7075e3aa
Improve split script (#1011)
- Added shebang and made the script executable.
- Added help text.
- Added -o/--out argument for specifying output directory.
- Added -e/--extension argument for specifying file extension of the
  implementation file.
- Made the script find httplib.h next to split.py instead of the current
  working directory. This makes it possible to call the script from
  another directory.
- Simplified code structure slightly.
- Improved variable naming to follow Python conventions.
2021-07-30 10:03:05 -04:00
yhirose
ccbddd8842 Allow LargeRandomData test only on Windows v0.9.2 2021-07-22 22:17:31 -04:00
yosh-matsuda
879dd261c2
Fix gzip compression/decompression over 4 GiB data size (#1002)
* Fix gzip compression/decompression over 4 GiB data size

* Add gzip test for large random data
2021-07-22 22:07:40 -04:00
xxrl
52f5eb5980
[Fix] ca_cert_path/ce_cert_store lose (#1004)
When redirect from http to https, user setting for ca_cert will lose

issue: #1003
2021-07-22 21:41:41 -04:00
Gregor Jasny
ea2f69a0d7
Add httplib::Error to std::string function (#999)
Fixes: #978
2021-07-19 21:17:44 -04:00
Gregor Jasny
9f2064a8ed
Fix remaining test warnings (#1001)
* Use portable way to encode ESC

'\e' is a GNU extension

* Use length specifier for size_t
2021-07-19 21:17:18 -04:00
yhirose
e3750d9ddf Simplefied server APIs 2021-07-17 18:09:30 -04:00
yhirose
c1eee3012e Fix #998 2021-07-17 17:18:56 -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
215b81342e Added a test case for #996 v0.9.1 2021-07-15 08:24:06 -04:00
yhirose
06bfa7e08b Fix #979 2021-07-14 22:49:49 -04:00
yhirose
3d83cbb872 Improve string compare performance 2021-07-12 23:51:56 -04:00
yhirose
8a803b30f6 Fix #990 2021-07-12 23:46:25 -04:00