Commit graph

1430 commits

Author SHA1 Message Date
Jiwoo Park
f1431311a4
Minor fixes on test cases (#1709)
* Fix data race

* Replace sleep_for() to wait_until_ready()
2023-11-11 21:28:50 -05:00
Jiwoo Park
1d14e051a5
Remove cryptui on Windows (#1710) 2023-11-11 21:26:57 -05:00
Jiwoo Park
97ae6733ed
Run fuzz test in CTest (#1707) 2023-11-09 19:35:15 -05:00
Jiwoo Park
1d6b22b5f0
Fix C6001 (#1701) 2023-10-30 07:13:40 -04:00
yhirose
1a49076b5b Removed unnecessary exception 2023-10-29 19:36:40 -04:00
Jiwoo Park
d0e4cb3f07
Include missing stdint.h on fuzz test (#1700)
* Include missing stdint.h

* Remove std:: from uint8_t
2023-10-29 19:26:06 -04:00
yhirose
e2813d9d4d Code cleanup. (Removed unnecessary .c_str() calls) 2023-10-23 16:43:12 -04:00
Andrea Pappacoda
20a7f088ce
build(meson): copy 1MB.txt test file (#1695)
Since tests are run in the build directory, the 1MB.txt file has to be
copied there.
2023-10-20 17:58:06 -04:00
yhirose
f63ba7d013 Fix #1685 2023-10-03 09:59:27 -04:00
yhirose
0a629d7391 Release v0.14.1 2023-09-30 22:26:23 -04:00
PabloMK7
a609330e4c
Add optional user defined header writer (#1683)
* Add optional user defined header writer

* Fix errors and add test
2023-09-30 22:13:14 -04:00
Jiwoo Park
c029597a5a
Update the remote address of www.httpwatch.com (#1664) 2023-09-13 10:33:33 -04:00
yhirose
30b7732565 Release v0.14.0 2023-08-22 20:19:07 -04:00
yhirose
6650632e7f Fix #1638 2023-08-22 19:36:10 -04:00
Sven Panne
afe627e7af
Avoid a -Warray-bounds false positive in GCC 13. (#1639)
The exact circumstances when this false positive is triggered are quite
tricky to reproduce, but it happened reproducibly with g++ 13.1 and 13.2 in
a close-source SW I'm working on.  The fix even improves performance by a
very tiny bit: There is no need to copy the std::smatch, having a const
reference is enough.

Just as a side note: -Warray-bounds seems to cause trouble in other
projects, too, so e.g. the Linux kernel has disabled since June 2022.
2023-08-14 10:26:54 -04:00
Duncan Ogilvie
67f6ff7fa9
Fix CPPHTTPLIB_ALLOW_LF_AS_LINE_TERMINATOR (#1634) 2023-08-03 17:01:40 -04:00
yhirose
c7ed1796a7 Release v0.13.3 2023-07-31 21:28:33 -04:00
yhirose
44c62d838e
Use memory mapped file for static file server (#1632)
* Use memory mapped file for static file server

* Fix build error
2023-07-31 07:43:50 -04:00
yhirose
6bb580cda8 Fix #1559 2023-07-31 00:27:26 -04:00
yhirose
00a8cb8e5d Code cleanup 2023-07-31 00:22:22 -04:00
yhirose
2e34a39673 Added StaticFileRanges test 2023-07-31 00:22:22 -04:00
yhirose
01b90829bc Removed unnecessary CRLF at the end of multipart ranges data 2023-07-31 00:22:22 -04:00
yhirose
e699bd0730 Release v0.13.2 2023-07-29 12:26:19 -04:00
Akın ELDEN
961a9379d5
Fix #1590 (#1630)
* ClientImpl: Connection=close header control moved from process_request to send_

* Connection=close header control moved from send_ to handle_request

* SSLClient::connect_with_proxy error handling improved

* to_string definition added for Error::ProxyConnection

* Comment improvement

---------

Co-authored-by: akinelden <akin.elden@gmail.com>
2023-07-29 12:09:25 -04:00
yhirose
ec87b04aff Fix #1619 2023-07-29 00:53:57 -04:00
yhirose
aabf752a51 Fix #1519 2023-07-28 23:37:45 -04:00
yhirose
afb0674ccb Fix #1624 2023-07-21 20:36:01 -04:00
bdenhollander
ee625232a4
Fix successful decompress reported as Error::Read (#1612)
* Fix successful decompress reported as Error::Read

Streams less than 4096 bytes are sometimes reported as failed reads because stream_.avail_in is not reduced to 0. The next iteration of the loop finds `prev_avail_in == strm_.avail_in` and return false. `ret = inflate(...)` returns Z_STREAM_END on the first iteration of the loop indicating that inflate is finished. This fix prevents the second iteration of the loop from failing.

* Fix successful decompress reported as Error::Read

- Add unit tests for raw deflate that illustrates the decompression failure when there are extra trailing bytes
2023-07-11 18:35:27 -04:00
Andrea Pappacoda
52d8dd41f1
build(meson): use C++14 with GTest >= 1.13.0 (#1618)
GoogleTest, starting with vesion 1.13.0, requires C++14 to build. This
patch enables C++14 if GoogleTest 1.13.0 or newer is detected when
compiling the tests with Meson, making it possible to use new GTest
versions.

You can find GoogleTest's release notes at
<https://github.com/google/googletest/releases/tag/v1.13.0>.
2023-07-11 18:32:41 -04:00
Alexandre Bouvier
be07d2d7a9
cmake: fix comment (#1616) 2023-07-08 13:24:36 -04:00
yhirose
0f1b62c2b3 Release v0.13.1 2023-07-08 07:41:24 -04:00
yhirose
c30906a541 Code cleanup 2023-07-07 19:43:37 -04:00
bgs99
3533503323
Fix explicit constructor warning (#1614) 2023-07-07 13:17:19 -04:00
yhirose
82acdca638 Release v0.13.0 2023-07-06 18:32:42 -04:00
vmaffione
a1e56a567b
Result: allow default constructor (#1609) 2023-07-05 12:05:29 -04:00
yhirose
0c17d172a2 Code cleanup 2023-07-05 09:06:21 -04:00
yhirose
5d8e7c761f Updated README 2023-07-05 08:45:05 -04:00
bgs99
17fc522b75
Add named path parameters parsing (Implements #1587) (#1608)
* Add named path parameters parsing

* Select match mode based on pattern

* Add examples and comments to README

* Add documentation to matchers
2023-07-05 07:44:19 -04:00
yhirose
f1daa5b88b Fix #1607 2023-07-04 20:27:11 -04:00
yhirose
fe9a1949a6 Fixed an example in README 2023-06-28 11:28:08 -04:00
yhirose
50cba6db9f Fix #1603 2023-06-27 21:23:23 -04:00
Nathan Moinvaziri
18592e7f98
Ability to turn off linking against OpenSSL if already detected. (#1602)
We already detect OpenSSL in our tree for another project, but don't want to
link httplib against OpenSSL or with SSL support.

Allow us to `set(HTTPLIB_IS_USING_OPENSSL FALSE)`.
2023-06-27 20:09:42 -04:00
yhirose
bd9612b81e
Changed to use auto (#1594) 2023-06-17 02:18:34 -04:00
yhirose
7ab5fb65b2
Code cleanup (#1593) 2023-06-16 18:08:28 -04:00
Andre Eisenbach
8df5fedc35
Fix -Wold-style-cast warnings (#1591)
Removed multiple old-style (C) casts and replaced them with the
appropriate _cast's. This makes httplib a better citizen inside projects
that are compiled with all warnings enabled.

Unfortunately one warning remains as a result of invoking an
OpenSSL macro (at least on Linux), that would have to be fixed
upstream.

Also fixed a few casts for invocations of setsockopt.
setsockopt takes a const void* for the value pointer, not a char*.
Well, except on Windows ...

Co-authored-by: Andre Eisenbach <git@4ae.us>
2023-06-16 17:30:24 -04:00
Jiwoo Park
4a61f68fa4
Don't overwrite the last redirected location (#1589)
* Don't overwrite the last redirected location

* Check the last redirected location
2023-06-16 14:56:16 -04:00
Jiwoo Park
067890133c
Use nghttp2-hosted httpbin.org (#1586)
* Use nghttp2-hosted httpbin.org

* Add CPPHTTPLIB_DEFAULT_HTTPBIN macro to choose the default httpbin.org
2023-06-15 11:12:41 -04:00
yhirose
d3076f5a70 v0.12.6 2023-06-10 07:02:38 +09:00
yhirose
ed129f057f Fixed C++11 warnings and code format 2023-06-09 20:49:46 +09:00
Jiwoo Park
eab5ea01d7
Load in-memory CA certificates (#1579)
* Load in-memory CA certs

* Add test cases for in-memory cert loading

* Don't use the IIFE style
2023-06-09 16:34:51 +09:00