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

1280 Commits

Author SHA1 Message Date
Andrea Pappacoda
1a2faf09e0
Add header-only Meson support (#955)
* Add header-only Meson support
This allows users to call `dependency('httplib')` and have the include
directory automatically configured

* Rename `httplib` to `cpp-httplib`
2021-06-05 16:45:00 -04:00
yhirose
5a43bb8149 Implemented #946 in a different way 2021-06-02 13:45:47 -04:00
yhirose
0104614656 Code refactoring 2021-06-02 08:11:31 -04:00
yhirose
77a77f6d2d Added set_default_headers on Server 2021-05-23 19:06:28 -04:00
Mathias Laurin
089b9daa1c
Fix virtual call in ClientImpl::~ClientImpl() (#942)
* Fix virtual call in ClientImpl::~ClientImpl()

This fixes a warning in clang tidy:

> Call to virtual method 'ClientImpl::shutdown_ssl' during
> destruction bypasses virtual dispatch

ClientImpl::~ClientImpl() calls lock_socket_and_shutdown_and_close()
that itself calls shutdown_ssl().  However, shutdown_ssl() is virtual
and C++ does not perform virtual dispatch in destructors, which results
in the wrong overload being called.

This change adds a non-virtual shutdown_ssl_impl() function that is
called from ~SSLClient().  We also inline sock_socket_and_shutdown_and_close()
and removes the virtual call in ~ClientImpl().

* Inline and remove lock_socket_and_shutdown_and_close()

The function only has one caller.
v0.8.9
2021-05-22 20:15:20 -04:00
yhirose
ba34ea4ee8 Fix #944 2021-05-22 19:24:50 -04:00
Baruch Nissenbaum
2917b8a005
Explicit cast from size_t to uInt (#941)
* Explicit cast from size_t to uInt

* static_cast<uInt> instead of C style cast
2021-05-19 18:03:59 -04:00
Joseph Huang
dcf24d45a2
fix ssesvr use of deleted function (#938) 2021-05-18 23:19:15 -04:00
yhirose
75fdb06696 Added a missing member in copy_settings. 2021-05-15 09:14:44 -04:00
Alex Hornung
e00ad37580
Add option to bypass URL encode of path (#934) 2021-05-15 08:48:25 -04:00
Vincent Stumpf
5cfb70c2b4
Fix some shadowed variable warnings (#935) 2021-05-15 08:46:16 -04:00
Alessio Pollero
2a70c45697
Fix client.cc code, since res.error() without operator overloading… (#921)
* Fix client.cc code, since res.error() without operator overloading causing error in Xcode

* Add unit test to check new error to string with operator overloading

* Add inline as requested in code review comment
2021-05-01 13:29:23 -04:00
Aswin Raj Kharel
c58b00580e
reserving before encoding (#912) 2021-04-24 16:19:14 -04:00
Ken Schalk
7c60e69c33
Remove redunant call to close_socket (#911) v0.8.8 2021-04-23 17:07:19 -04:00
yhirose
33e94891ee Updated test.cc 2021-04-22 08:04:46 -04:00
yhirose
73e0729f63 Change sink.write() to return boolean 2021-04-22 07:14:08 -04:00
yhirose
21c529229c Fixed timeout issues 2021-04-22 07:14:08 -04:00
yhirose
63643e6386 Code format v0.8.7 2021-04-13 20:52:49 -04:00
yhirose
6cc2edce99 Added set_address_family 2021-04-13 20:49:52 -04:00
yhirose
d122ff3ca8 Code formatting 2021-04-13 12:38:45 -04:00
James Young
14c6d526b4
Use newer version-flexible TLS/SSL method (#904) 2021-04-13 09:11:38 -04:00
Philipp Hasper
28e07bca16
Fixed minor code smells (#901) 2021-04-09 14:55:21 -04:00
yhirose
faa5f1d802 Additional changes for #889 v0.8.6 2021-04-05 16:13:41 -04:00
yhirose
9d3365df54 Fix #889 2021-04-05 11:40:53 -04:00
yhirose
6ff84d34d1
Another simpler implementation of #890 (#891) 2021-04-02 18:25:04 -04:00
yhirose
b845425cd0 Fix #878 v0.8.5 2021-03-16 19:42:44 -04:00
yhirose
89519c88e2 Fix #874 2021-03-10 15:57:56 -05:00
yhirose
ff813bf99d Fix #863 2021-02-17 15:36:56 -05:00
yhirose
cf475bcb50 Fix #860 v0.8.4 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 #852 2021-02-02 22:09:35 -05:00
Nikolas
0542fdb8e4
Add exception handler (#845)
* 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
v0.8.3
2021-01-28 17:19:11 -05:00
yhirose
78c474c744 Update README 2021-01-27 11:59:42 -05:00
yhirose
88411a1f52 Fix #846 2021-01-27 14:35:32 +00:00
yhirose
ae6cf70bc4 Updated README 2021-01-26 08:38:28 -05:00
yhirose
68d1281759 Resolve #839 v0.8.2 2021-01-23 13:33:27 -05:00
yhirose
0308d60cb2
Resolve #831 (#835) 2021-01-23 12:23:06 -05:00
yhirose
59f5fdbb33 Resolve #840 2021-01-23 11:43:01 -05:00
Anonymous
13184f5f80
Return Server& from handler setters (#836)
* Update httplib.h

* Update httplib.h

* Update httplib.h

* Update httplib.h
2021-01-22 09:20:21 -05:00
Eric Lee
8d9a477edb
No content check (#823)
* No content check

* unit test for no content

* fixing merge conflict break

* oops during manual merge conflict
v0.8.1
2021-01-13 17:51:40 -05:00
yhirose
85b4abbf16 Updated the simple example v0.8.0 2021-01-07 19:56:33 -05:00
yhirose
e42a358da8 Updated README 2021-01-07 19:00:24 -05:00
yhirose
f008fe4539
Added middleware support (#816) 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
242706ea34 Fix #820 2020-12-31 18:14:05 -05:00
yhirose
a9f5f8683f Fixed warnings on Visual C++ 2020-12-31 11:35:11 -05:00
yhirose
60c2213893 Fix #817 2020-12-31 10:58:44 -05:00
yhirose
eb2d28bca2 Code cleanup 2020-12-31 10:37:06 -05:00
Yuri Santos
86f637a246
Added encode_uri_param tests with UTF-8 characters (#818)
Remove additional lines between tests
2020-12-30 23:06:36 -05:00