mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-19 11:19:36 +00:00
Report a response body over the limit as ExceedMaxPayloadSize
A buffered request whose response body went over set_payload_max_length(), also once decompressed, failed with Error::Read, while the Stream API reports the same limit as Error::ExceedMaxPayloadSize. read_content() already marks it with a 413 status, so map that status to ExceedMaxPayloadSize next to the 415 and 500 the client maps already.
This commit is contained in:
1 parent
344aceb446
commit
d99c697be6
5 files changed
+43
-2
No files matched your search
@@ -1268,6 +1268,8 @@ cli.set_max_timeout(std::chrono::seconds(5));
|
||||
cli.set_payload_max_length(1024 * 1024 * 512); // 512MB
|
||||
```
|
||||
|
||||
A response body over the limit, also once decompressed, fails the request with `Error::ExceedMaxPayloadSize`.
|
||||
|
||||
### Receive content with a content receiver
|
||||
|
||||
```c++
|
||||
|
||||
Reference in new issue
Block a user