yhirose
ae63b89cbf
Use SOCK_CLOEXEC instead of __linux__
test / ubuntu (push) Has been cancelled
test / macos (push) Has been cancelled
test / windows (push) Has been cancelled
2024-08-06 17:31:55 -04:00
yhirose
ff038f98b7
Merge branch 'thread-safe-cloexec' of github.com:kdombroski/cpp-httplib into kdombroski-thread-safe-cloexec
2024-08-06 17:22:43 -04:00
yhirose
e00fd06355
Release v0.16.1
2024-08-06 17:04:22 -04:00
yhirose
521529d24d
Fix #1481 (with content provider) ( #1527 )
...
test / ubuntu (push) Waiting to run
test / macos (push) Waiting to run
test / windows (push) Waiting to run
* Fix #1481 (with content provider)
* Improve shutdown performance
* Make shutdown action more stable
* Move some tests up
* Simplified
* Simplified
2024-08-06 13:43:00 -04:00
yhirose
ed0719f2bc
Code format
2024-08-06 07:20:05 -04:00
hanslivingstone
6a848b1a16
Require a minimum of TLS 1.2 ( #1889 )
...
test / ubuntu (push) Has been cancelled
test / macos (push) Has been cancelled
test / windows (push) Has been cancelled
TLS 1. is deprecated: https://www.ietf.org/rfc/rfc8996.html
2024-07-30 17:18:33 -04:00
mol123
c8bcaf8a91
Fix build when targeting Windows 7 as platform. ( #1869 )
...
test / ubuntu (push) Has been cancelled
test / macos (push) Has been cancelled
test / windows (push) Has been cancelled
* Fix build when targeting Windows 7 as platform.
This change makes more of the code introduced in
https://github.com/yhirose/cpp-httplib/pull/1775
conditional on feature macros.
`CreateFile2`, `CreateFileMappingFromApp` and `MapViewOfFileFromApp` are
available only starting from Windows 8.
* https://learn.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-createfile2
* https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-createfilemappingfromapp
* https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-mapviewoffilefromapp
* Update feature macros used and use `GetFileSizeEx` conditionally.
2024-07-02 10:58:40 -04:00
Hlado
8cd0ed0509
Added move assignment operator to Client class. ( #1873 )
test / ubuntu (push) Has been cancelled
test / macos (push) Has been cancelled
test / windows (push) Has been cancelled
2024-06-30 11:17:00 -04:00
Daniel Ludwig
388a8c007c
Fix build on Windows with no WINAPI_PARTITION_APP support ( #1865 )
test / ubuntu (push) Has been cancelled
test / macos (push) Has been cancelled
test / windows (push) Has been cancelled
2024-06-24 15:13:37 -04:00
Zhenlin Huang
9e4f93d87e
Allow hex for ipv6 literal addr in redirect ( #1859 )
...
Co-authored-by: jaredhuang <jaredhuang@tencent.com>
2024-06-17 11:44:51 -04:00
Rainer Schielke
c1a09daf15
avoid memory leaks if linked with static openssl libs ( #1857 )
...
* New function SSLServer::update_certs. Allows to update certificates while server is running
* New function SSLServer::update_certs. Added unit test
* avoid memory leaks if linked with static openssl libs
---------
Co-authored-by: CEU\schielke <Rainer.Schielke@heidelberg.com>
2024-06-14 15:40:03 -04:00
yhirose
8438df4a95
Release v0.16.0
2024-06-11 18:20:47 -04:00
Rainer Schielke
d44031615d
New function SSLServer::update_certs. Allows to update certificates while server is running ( #1827 )
...
* New function SSLServer::update_certs. Allows to update certificates while server is running
* New function SSLServer::update_certs. Added unit test
---------
Co-authored-by: CEU\schielke <Rainer.Schielke@heidelberg.com>
2024-06-03 09:37:40 -04:00
Sean Quinn
98cc1ec344
Allow hex for ip6 literal addr, fix #1800 ( #1830 )
...
* Allow hex for ip6 literal addr, fix #1800
* Add UT for ipv6 + Universal client implementation
* add /n at EOF
2024-05-26 08:57:07 -04:00
Pavel P
05f9f83240
Avoid unreferenced formal parameter warning in get_range_offset_and_length ( #1838 )
...
Release builds result in the following warning because `content_length` param was used only inside asserts:
1> cpp-httplib\httplib.h(4933,45): warning C4100: 'content_length': unreferenced formal parameter
2024-05-17 09:56:06 +09:00
Karen Dombroski
fb739dbaec
threadsafe accept on windows, linux
...
* Windows has WSAAccept() which will create sockets inheriting flags from
the server socket
* Linux has accept4() which has a flags argument supporting SOCK_CLOEXEC
2024-05-01 21:58:58 +12:00
Karen Dombroski
50fce538c6
threadsafe CLOEXEC on platforms that support it
...
SOCK_CLOEXEC is a flag available on some platforms to enable creation of
sockets with CLOEXEC already set
2024-05-01 21:46:50 +12:00
Jiwoo Park
3b6597bba9
Fix query parsing when value has =
characters ( #1822 )
...
* Implement string divider to replace splitter
* Divide query string in half
* Add a test case for query values containing the '=' character
* Add test cases for string divider
* Fix warnings
2024-04-21 19:17:14 -04:00
rndm13
2bc550b2f0
Added progress to POST, PUT, PATCH and DELETE requests ( #1821 )
...
* Added progress to POST, PUT, PATCH, DELETE requests
* Added tests for post, put, patch, delete progress/cancellation
* fix accidental infinite recursion in delete
---------
Co-authored-by: rndm <rndm@localhost.localdomain>
2024-04-21 19:13:41 -04:00
Kent
560854a961
Apply range header base on response status code ( #1806 )
...
* Enable ignoring range header to generate customized response
* Apply range header base on response status code
2024-04-11 23:28:21 -04:00
yhirose
07288888ad
Code cleanup
2024-04-11 22:26:30 -04:00
yhirose
34d392cf3d
Merge branch 'fix' of github.com:HerrCai0907/cpp-httplib into HerrCai0907-fix
2024-04-11 22:22:58 -04:00
yhirose
825c3fbbb1
Removed excess usage of std::move
2024-04-11 21:21:27 -04:00
Rusty Conover
00bdf73ec6
fix: increase default receive buffer to 16kb ( #1814 )
...
Since TLS packets have a maximum size of 16kb it makes
sense to fully accommodate them on reads.
Co-authored-by: Rusty Conover <rusty@Juno.local>
2024-04-09 16:59:07 -04:00
Jiwoo Park
f44ab9b3da
Fix range parser when parsing too many ranges ( #1812 )
...
* Implement range parser without std::regex
* Add test cases for invalid ranges
2024-04-07 10:06:16 -04:00
yhirose
548dfff0ae
Fix #1793
2024-03-09 22:26:17 -05:00
Congcong Cai
4dd2f3d03d
fix ambiguous for HandlerWithResponse and Handler in set_error_handler
...
using lambda expression as Handler in set_error_handler will cause ambiguous.
Template forwarding can forward HandlerWithResponse to the correct overloading function
2024-03-07 19:07:39 +08:00
Jiwoo Park
c5a0673c93
Use final keyword for devirtualization ( #1779 )
2024-02-17 09:17:15 -05:00
Sergey
ad40bd6a00
Implement file mapping for UWP apps ( #1775 )
...
Fixes #1773 .
2024-02-08 22:59:34 -05:00
yhirose
5c00bbf36b
Release v0.15.3
2024-02-05 22:12:43 -05:00
yhirose
9d6f5372a3
Fix #1772
2024-02-05 22:11:53 -05:00
yhirose
80c0cc445e
Release v0.15.2
2024-02-02 23:29:30 -05:00
yhirose
762024b890
Fix #1768
2024-02-02 23:17:32 -05:00
yhirose
82a90a2325
Update year
2024-01-29 08:53:01 -05:00
yhirose
b7cac4f4b8
Release v0.15.1
2024-01-29 07:40:56 -05:00
yhirose
e323374d2a
Fix #1766
2024-01-28 17:43:51 -05:00
Jiwoo Park
ffc294d37e
Reduce object copy ( #1767 )
2024-01-28 08:18:29 -05:00
yhirose
fceada9ef4
Changed to return 416 for a request with an invalid range
2024-01-28 08:13:19 -05:00
yhirose
5f0f73fad9
Reduce duplicate computation for ranges
2024-01-27 19:07:52 -05:00
yhirose
530d6ee098
Release v0.15.0
2024-01-27 17:39:58 -05:00
yhirose
420c9759c6
Fix #1694
2024-01-27 16:13:54 -05:00
yhirose
2ce7c22218
Fix #1747
2024-01-27 12:56:39 -05:00
Wander Nauta
4ef9ed80cd
Treat paths with embedded NUL bytes as invalid ( #1765 )
...
Fixes #1763 .
2024-01-27 08:22:00 -05:00
Jiwoo Park
44b3fe6277
Support move semantics for Response::set_content() ( #1764 )
2024-01-27 07:53:19 -05:00
Ilya Andreev
449801990f
Add a getter for a bearer token from a request ( #1755 )
...
* Add a getter for a bearer token from a request
* Replace a method for bearer token getter with a free function
2024-01-15 08:57:22 -05:00
Jean-Francois Simoneau
af2928d316
Fix select() return code for fd >= 1024 ( #1757 )
2024-01-15 08:27:31 -05:00
Matthias Bilger
65218ce222
added missing include of exception ( #1752 )
2023-12-31 18:59:43 -05:00
Adam Gajda
55e99c4030
Fix -Wold-style-cast warning ( #1751 )
2023-12-31 18:43:31 -05:00
TheOnlyJoey
b63d50671d
Fixes Windows std::max macro problems ( #1750 )
2023-12-30 11:37:58 -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