yhirose
7bbff160f0
Update test/test.cc
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-12-05 15:09:52 -05:00
yhirose
ee595cae63
Update httplib.h
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-12-05 15:09:08 -05:00
yhirose
79a8307fbf
Code cleanup
2025-12-05 14:53:33 -05:00
yhirose
ec170f3ffa
Refactor ETag handling: extract check_if_not_modified and check_if_range methods for improved readability and maintainability
2025-12-05 14:23:45 -05:00
yhirose
42e762ddd6
Refactor ETag handling: use 'auto' for type inference and improve code readability
2025-12-05 12:46:05 -05:00
yhirose
c5dfb1019c
Update httplib.h
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-12-05 12:36:31 -05:00
yhirose
7856cc2520
Update httplib.h
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-12-05 12:34:49 -05:00
yhirose
82e892db2d
Resolved code review comments
2025-12-05 00:33:10 -05:00
yhirose
593199caa4
Update httplib.h
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-12-05 00:29:11 -05:00
yhirose
1c30c629a5
Fix type for mtime in FileStat and improve ETag handling comments
2025-12-05 00:13:51 -05:00
yhirose
dc77463896
Refactor ETag handling: separate strong and weak ETag checks for If-Range requests
2025-12-05 00:09:19 -05:00
yhirose
ee01189189
Update httplib.h
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-12-05 00:02:04 -05:00
yhirose
f0f356797f
Update test/test.cc
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-12-05 00:01:52 -05:00
yhirose
536e637877
Update httplib.h
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-12-05 00:00:19 -05:00
yhirose
d934f569cb
Enhance HTTP date parsing with improved error handling and locale support
2025-12-04 23:45:33 -05:00
yhirose
8d6123c126
Add ETag and Last-Modified handling for If-Range requests
2025-12-04 23:15:29 -05:00
yhirose
ce37f8b89a
Fix #2242 : Implement ETag and Last-Modified support for static file responses
2025-12-04 22:52:34 -05:00
yhirose
dbd5ca4bf2
Add error handling for stream read timeouts and connection closures
2025-12-04 19:19:18 -05:00
yhirose
143019a38c
Fix #2284
2025-12-02 17:24:27 -05:00
yhirose
1d36013fc3
Update README
2025-12-02 17:08:53 -05:00
yhirose
8bba34eebc
Add New Streaming API support ( #2281 )
2025-12-01 21:40:13 -05:00
Aaron Gokaslan
0a9102ff6b
Optimize ThreadPool and MatcherBase constructors ( #2283 )
...
Add a missing reserve and missing std::move to each ctor respectively. The latter should really be caught by a clang-tidy perf linter.
2025-11-30 21:49:23 -05:00
bigmoonbit
c1fa5e1710
chore: fix some typos in comments ( #2282 )
...
Signed-off-by: bigmoonbit <bigmoonbit@outlook.com >
2025-11-27 20:34:18 -05:00
yhirose
84796738fc
Fix #2248
2025-11-25 22:22:07 -05:00
yhirose
adf58bf474
Release v0.28.0
v0.28.0
2025-11-25 21:06:51 -05:00
yhirose
337fbb0793
Fix #2279
...
Enhance request handling: add support for requests without Content-Length or Transfer-Encoding headers
2025-11-25 20:30:43 -05:00
Copilot
9e7861b0b4
Add #undef _res after including resolv.h to prevent macro conflicts ( #2280 )
...
* Initial plan
* Add #undef _res after including resolv.h to prevent macro conflicts
Co-authored-by: yhirose <357397+yhirose@users.noreply.github.com >
* Complete task - added #undef _res after resolv.h include
Co-authored-by: yhirose <357397+yhirose@users.noreply.github.com >
* Remove accidentally committed codeql build artifacts
Co-authored-by: yhirose <357397+yhirose@users.noreply.github.com >
* Add inline comment explaining why #undef _res is necessary
Co-authored-by: yhirose <357397+yhirose@users.noreply.github.com >
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: yhirose <357397+yhirose@users.noreply.github.com >
2025-11-25 20:00:10 -05:00
Clarkok Zhang
27ee115a60
Fix android getaddrinfo issue ( #2273 )
...
Co-authored-by: Clarkok Zhang <clarkok8@gmail.com >
2025-11-14 16:48:21 -05:00
Clarkok Zhang
59882752aa
Add Client::Post with both content provider and receiver ( #2268 )
...
Co-authored-by: Clarkok Zhang <clarkok8@gmail.com >
2025-11-14 14:52:06 -05:00
yhirose
61e9f7ce8f
Fix #2270
2025-11-14 14:17:04 -05:00
VZ
1acf18876f
CMake: Add HTTPLIB_SHARED option, don't define BUILD_SHARED_LIBS ( #2266 )
...
To avoid surprises in the projects consuming the library, don't define
BUILD_SHARED_LIBS option ourselves but just use its value, if provided,
to define HTTPLIB_SHARED option which can be also set directly to
specify whether we should build static or shared library.
Closes #2263 .
2025-11-10 22:17:43 -05:00
chansikpark
4b2b851dbb
Fix HTTP 414 errors hanging until timeout ( #2260 )
...
* Fix HTTP 414 errors hanging until timeout
* All errors (status code 400+) close the connection
* 🧹
---------
Co-authored-by: Wor Ker <worker@factory>
2025-11-02 22:23:42 -05:00
yhirose
551f96d4a2
Remove REMOTE_PORT dependency from UnixSocketTest.PeerPid
2025-10-27 20:40:12 -04:00
yhirose
eacc1ca98e
Release v0.27.0
v0.27.0
2025-10-27 19:57:53 -04:00
yhirose
ac9ebb0ee3
Merge commit from fork
...
* Fix "Untrusted HTTP Header Handling (REMOTE*/LOCAL*)"
* Fix "Untrusted HTTP Header Handling (X-Forwarded-For)"
* Fix security problems in docker/main.cc
2025-10-27 19:54:12 -04:00
yhirose
11eed05ce7
Fix #2255 and #2256
2025-10-27 19:51:55 -04:00
yhirose
f3bba0646a
Fix benchmark test issue on Windows ( #2258 )
2025-10-27 18:27:55 -04:00
yhirose
2da189f88c
Fix EventDispatcher problem ( #2257 )
2025-10-27 18:10:52 -04:00
yhirose
6e0f211cff
Fix problem with .gitignore for examples
2025-10-27 17:54:27 -04:00
yhirose
318a3fe425
Fix problem with installing OpenSSL for Windows ( #2254 )
2025-10-25 22:35:21 -04:00
yhirose
2d8d524178
Fix #2251
2025-10-25 22:06:42 -04:00
yhirose
afa88dbe70
Fix #2250
2025-10-25 21:36:53 -04:00
yhirose
08133b593b
Merge branch 'staticlibs-ssl_error_reporting'
2025-10-25 19:32:31 -04:00
yhirose
8aedbf4547
Add a unit test
2025-10-25 19:31:48 -04:00
yhirose
cde29362ef
Merge branch 'ssl_error_reporting' of github.com:staticlibs/cpp-httplib into staticlibs-ssl_error_reporting
2025-10-25 19:09:09 -04:00
yhirose
bae40fcdf2
Resolve #2237
2025-10-25 16:48:45 -04:00
crueter
db561f5552
[cmake] FindBrotli: do not add Brotli:: targets if they already exist ( #2249 )
...
Not checking for this is terrible practice.
2025-10-16 09:59:15 -04:00
Andrea Pappacoda
35c52c1ab9
build(meson): use C++17 for gtest >= 1.17.0 ( #2241 )
2025-09-20 15:06:49 -04:00
Alex Kasko
23ff9a5605
Fix error reporting in SSLClient
...
When the `SSLClient` is used to connect to a plain-HTTP server (which
can happen in clients due to some end-user misconfiguration) it can
return a failure from the `send()` call without setting the `Error`
reference to the corresponding error code. This can cause problems to
callers, that may expect that, when the check like this is passed on
the response:
```c++
if (res.error() == Error::Success)
```
then they can access the response contents with `res.value()`. When
`SSLClient`'s connection fails - the contents `unique_ptr` is not set
and an attemt to access it causes UB.
This change fixes the `SSLClient::create_and_connect_socket` method
making sure that, the `Error` value is set correctly when the
`is_valid()` check fails.
2025-09-18 13:44:39 +01:00
yhirose
41be1e24e3
Code cleanup
2025-09-15 07:59:53 -04:00