mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-04-12 03:38:30 +00:00
* Fix #2339 * Fix CI errors * Fix Windows build error * Fix CI errors on Windows * Fix payload_max_length initialization in BodyReader * Initialize payload_max_length with CPPHTTPLIB_PAYLOAD_MAX_LENGTH in BodyReader * Update README and tests to clarify payload_max_length behavior and add no limit case * Fix server thread lambda capture in ClientVulnerabilityTest
This commit is contained in:
11
README.md
11
README.md
@@ -958,6 +958,12 @@ cli.set_write_timeout(5, 0); // 5 seconds
|
||||
cli.set_max_timeout(5000); // 5 seconds
|
||||
```
|
||||
|
||||
### Set maximum payload length for reading a response body
|
||||
|
||||
```c++
|
||||
cli.set_payload_max_length(1024 * 1024 * 512); // 512MB
|
||||
```
|
||||
|
||||
### Receive content with a content receiver
|
||||
|
||||
```c++
|
||||
@@ -1158,6 +1164,11 @@ httplib::Server svr;
|
||||
svr.listen("127.0.0.1", 8080);
|
||||
```
|
||||
|
||||
Payload Limit
|
||||
-------------
|
||||
|
||||
The maximum payload body size is limited to 100MB by default for both server and client. You can change it with `set_payload_max_length()` or by defining `CPPHTTPLIB_PAYLOAD_MAX_LENGTH` at compile time. Setting it to `0` disables the limit entirely.
|
||||
|
||||
Compression
|
||||
-----------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user