Commit graph

447 commits

Author SHA1 Message Date
yhirose
6cc2edce99 Added set_address_family 2021-04-13 20:49:52 -04:00
yhirose
9d3365df54 Fix 2021-04-05 11:40:53 -04:00
yhirose
6ff84d34d1
Another simpler implementation of () 2021-04-02 18:25:04 -04:00
yhirose
b845425cd0 Fix 2021-03-16 19:42:44 -04:00
yhirose
cf475bcb50 Fix 2021-02-12 12:21:43 -05:00
yhirose
bc80d7c789 Fixed ClientStop test problem 2021-02-06 20:12:30 -05:00
yhirose
b7566f6961 Resolve 2021-02-02 22:09:35 -05:00
Nikolas
0542fdb8e4
Add exception handler ()
* Add exception handler

* revert content reader changes

* Add test for and fix exception handler

* Fix warning in test

* Readd exception test, improve readme note, don't rethrow errors, remove exception handler response
2021-01-28 17:19:11 -05:00
yhirose
68d1281759 Resolve 2021-01-23 13:33:27 -05:00
yhirose
0308d60cb2
Resolve () 2021-01-23 12:23:06 -05:00
Eric Lee
8d9a477edb
No content check ()
* No content check

* unit test for no content

* fixing merge conflict break

* oops during manual merge conflict
2021-01-13 17:51:40 -05:00
yhirose
f008fe4539
Added middleware support () 2021-01-07 18:40:52 -05:00
yhirose
ddf41d29ef Added const *char and size_t interface 2021-01-06 22:39:58 -05:00
yhirose
3f88a46c4a Code format 2020-12-31 18:14:28 -05:00
yhirose
a9f5f8683f Fixed warnings on Visual C++ 2020-12-31 11:35:11 -05:00
Yuri Santos
86f637a246
Added encode_uri_param tests with UTF-8 characters ()
Remove additional lines between tests
2020-12-30 23:06:36 -05:00
yhirose
b9641048fc Switch to hghttp2.org/httpbin for redirect test. () 2020-12-19 20:27:52 -05:00
yhirose
e9c6c6e609 Code format 2020-12-19 20:14:53 -05:00
yhirose
40db42108f Fixed problem with invalid requests including spaces in URL path 2020-12-19 12:03:08 -05:00
Yuri Santos
78ea786abd
[PR] Special function to encode query params ()
* Special function to encode query params

* Fix #include <iomanip>

* Added unescaped charsets to encode_query_param

* Unit tests for encode_query_param
2020-12-18 17:51:11 -05:00
yhirose
7c1c952f5a Don't allow invalid status code format (It sould be a three-digit code.) 2020-12-15 20:25:24 -05:00
yhirose
a6edfc730a Added a unit test for static file with range 2020-12-15 18:47:51 -05:00
yhirose
88c961f37e Removed std::atomic<Error> error_ 2020-12-01 15:17:34 +00:00
yhirose
b952376968 Fixed warning 2020-12-01 03:50:55 +00:00
yhirose
5dd605d3a2 Fix 2020-11-30 21:49:31 -05:00
David Wu
02d3cd5909 Fix multiple threading bugs including and 2020-11-29 12:29:15 -05:00
yhirose
a5c239c174 Fix 2020-11-21 16:35:31 -05:00
yhirose
c2afc5ca44 Added chunked content provider support on client 2020-11-21 08:46:50 -05:00
yhirose
cee062d4c9 Fixed unit tests due to the change in 2020-11-19 21:04:46 -05:00
yhirose
95d0b073bd Fix 2020-11-15 08:13:08 -05:00
yhirose
f086bf5310 Fix 2020-11-08 18:16:23 -05:00
yhirose
6613d7b7ad Fixed warnings 2020-11-08 17:59:11 -05:00
miketsts
b6b2eaf5bc
Add unit test SSLConnectTimeout ()
Add unit test for issue  fixed in PR , which does not contain
the test of its own.

The test creates a fake SSL server, inherited from SSLServer, which
does not create an SSL context. When an SSL client attempts to send it
a request, it gets a timeout error. Prior to PR , the client would
wait indefinitely

Co-authored-by: Michael Tseitlin <michael.tseitlin@concertio.com>
2020-11-07 09:41:20 -05:00
yhirose
eb4b7c70a9 Fix 2020-11-07 09:33:22 -05:00
yhirose
041122908c Fix problem with invalid range 2020-11-05 00:20:59 -05:00
yhirose
401de608df Fixed debug option problem. 2020-11-05 00:20:59 -05:00
Omkar Jadhav
e1f781a21a
[oss-fuzz] Enable msan for fuzz tests ()
* Disable openssl as we're not using it in fuzz tests

* Increase timeout in ClientStop test
2020-11-04 11:30:56 -05:00
Omkar Jadhav
72b81badad
Fix issues reported by oss-fuzz ()
* Fix oss-fuzz issue 

* Add test for oss-fuzz issue  

* Fix oss-fuzz issue  

* Revert change and add new test cases
2020-11-03 11:36:02 -05:00
yhirose
17428a8fbf Fixed warning 2020-11-03 09:16:28 -05:00
Daniel Ottiger
6e1879dfae
ssl-verify-host: fix verifying ip addresses containing zero's ()
* 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
yhirose
3b29cd0bdc Fix 2020-10-25 12:14:54 -04:00
yhirose
0ed70c4d9f Fixed unit test errors 2020-10-21 14:34:27 -04:00
Omkar Jadhav
bc4a613b6d
Fix suffix-byte-range issue () 2020-10-20 11:11:27 -04:00
yhirose
4bb001351c Fix 2020-10-19 22:13:24 -04:00
Omkar Jadhav
5292142046
Add cpp-httplib to oss-fuzz ()
* *Add server fuzzer target  and seed corpus
* Add fuzz_test option to Makefile

* Fix 

* 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
yhirose
316add860b Added ReadTimeoutSSL test 2020-10-08 22:55:09 -04:00
Omkar Jadhav
143b2dd15a
Fix memory leak due caused due to X509_STORE ()
* 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 

Co-authored-by: yhirose <yuji.hirose.bug@gmail.com>
2020-10-02 13:17:37 -04:00
yhirose
d87082f04b Split SlowPost test 2020-09-29 19:17:34 -04:00
yhirose
559c407552 Adjusted SlowRequest test 2020-09-25 18:13:10 -04:00