1
0
mirror of synced 2025-04-24 21:07:01 +03:00

461 Commits

Author SHA1 Message Date
Kai Aoki
869f5bb279 fix ExceptionHandlerTest.ContentLength 2022-07-15 11:50:26 +09:00
yhirose
37bb3c6a77
No longer support VS 2013 and older #1325 (#1326)
* Fixed a warning

* No longer support VS 2013 and older (Fix #1325)
2022-07-14 20:57:41 -04:00
yhirose
7ed77b02ad Disable YouTubeNoSSLDigest 2022-07-08 17:40:05 -04:00
yhirose
127a64d5a0
Skip preamble and epilogue in multipart/form-data (Fix #1317) (#1320)
* fix: skip MIME preamble (#1317)

* Skip epilogue in multipart/form-data

Co-authored-by: Gavin1937 <71205842+Gavin1937@users.noreply.github.com>
2022-07-08 17:26:50 -04:00
yhirose
caa31aafda Accept large data transfer over SSL (Fix #1261, Close #1312) 2022-07-02 07:50:33 -04:00
yhirose
dae318495f Revert "Accept large data transfer over SSL (#1261)"
This reverts commit 307b729549a5243fde63b46e592d04793f1ec73f.
2022-07-02 07:18:59 -04:00
conghuawang
df20c27696
resolve http server can't send file large than 2GB (Fix #1290) (#1294)
* resolve problem: http server can't send file large than 2GB.
add unit test for http server send large file.
add /bigobj compile option to msvc x64.

* disable unit test "ServerLargeContentTest" due to out-of-memory on GitHub Actions.
2022-05-27 11:56:20 -04:00
yhirose
a5a62768c0
Fix #1292 (#1296) 2022-05-27 11:54:43 -04:00
yhirose
fee8e97b4e
Rename fuzzing test corpus for #1264 2022-05-03 14:53:59 -04:00
yhirose
72d9ed4056 Added fuzzing corpus for #1264 2022-05-02 18:06:14 -04:00
Yoshiki Matsuda
307b729549
Accept large data transfer over SSL (#1261)
* Add large data transfer test

* Replace `SSL_read` and `SSL_write` with `ex` functions

* Reflect review comment

* Fix return value of `SSLSocketStream::read/write`

* Fix return value in the case of `SSL_ERROR_ZERO_RETURN`

* Disable `LargeDataTransfer` test due to OoM in CI
2022-04-27 21:08:39 -04:00
Andrea Pappacoda
d1d3fcdfd5
build(meson): mark *_encrypted_pem as test deps (#1255)
Meson only runs required targets. The key_encrypted_pem and
cert_encrypted_pem targets added in 020b0db090dc8e197cbedbdc4db7e3120eda5333
and 8191fd8e6c5a27e034a34084afe61f17a9420cfa weren't added to the list
of targets required by the test target, so the generation of the
encrypted certs was skipped, resulting in the failure of
BindServerTest.BindAndListenSeparatelySSLEncryptedKey.
2022-04-19 07:12:00 -04:00
yhirose
cb41947eb4
Fix #1235 (#1243)
* Fix #1235

* fix BindIPAddress error (#1242)

* Code cleanup

* Added a unit test

* Commented out 'SSLClientTest.SetInterfaceWithINET6'

* Fixed incorrect return value from if2ip

* Removed if_nametoindex call

Co-authored-by: Kotarou <2918558+CyberKoo@users.noreply.github.com>
2022-04-13 21:32:46 -04:00
Andrea Pappacoda
020b0db090
build(meson): generate key_encrypted.pem (#1221)
8191fd8e6c5a27e034a34084afe61f17a9420cfa only added one of the two files
2022-03-20 12:21:45 -04:00
yhirose
c82d1e52cc Fix #1214 2022-03-16 10:56:33 -04:00
yhirose
846151b605 Added a unit test case for large multipart form data 2022-03-16 09:37:13 -04:00
yhirose
f7b9501662 clangformat 2022-02-27 14:31:22 -05:00
yhirose
49d2e1f135 Fix problem with InvalidPort test 2022-02-27 14:29:34 -05:00
Sebastien Blanchet
8191fd8e6c
Add optional private key password to SSLServer ctor (#1205) 2022-02-27 14:16:15 -05:00
yhirose
63d6e9b91b Removed up.sh and down.sh 2022-02-09 17:16:18 -05:00
Andrea Pappacoda
894fcc8e02
test: add missing "_Online" suffix (#1183)
This test fails reproducibly in a Debian build chroot, and they generally don't have internet access
2022-01-30 12:34:52 -05:00
Gregor Jasny
87e03dd1ce
Report connection timeout as separate event (#1171) 2022-01-26 17:32:40 -05:00
yhirose
ee8371f753 Added 'PostLarge' unit test for #1169 2022-01-22 09:52:27 -05:00
yhirose
081723f983 Add another fuzz test corpus 2022-01-20 15:27:26 -05:00
yhirose
11e02e901c Fixed unit test 2021-12-31 16:10:57 -05:00
yhirose
65a8f4cf44 Added hosted_at. (Resolve #1113) 2021-12-31 15:35:52 -05:00
yhirose
865b0e4c03 Resolve #1145 2021-12-26 07:53:06 -05:00
yhirose
20056f6cda Update test.cc 2021-12-19 14:19:10 -05:00
yhirose
793ae9855e
Fix #1041 (#1132)
* Fix #1041

* Fixed problem with is_socket_alive

* Adjust the way to check if the sockt is still alive.

* Revert "Adjust the way to check if the sockt is still alive."

This reverts commit 6c673b21e5439087e3cdc9c3dd39eba2d99928c8.

* Adjust is_socket_alive according to the code review
2021-12-16 21:06:17 -05:00
yhirose
9fa426d51b Added more fuzzing corpus 2021-12-14 18:35:20 -05:00
yhirose
743ecbd365
Issue1121 (#1122)
* Fixed test/Makefile problem when cleaning *.pem files

* Fix #1121
2021-12-11 19:07:12 -05:00
Andrea Pappacoda
824e7682e4
test: add missing _Online suffixes (#1110) 2021-11-27 09:54:05 -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
Yuji Hirose
301faa074c Added test case for #1065 2021-10-29 07:29:23 -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) 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
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
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
461acb02f5 Comment out SlowPostFail test for now 2021-09-10 22:37:31 -04:00
yhirose
1cc6930363 Append '_Online' suffix to Unit test names that access external servers 2021-08-23 13:02:19 -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
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
yhirose
ccbddd8842 Allow LargeRandomData test only on Windows 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