mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-19 11:19:36 +00:00
Address review of the audit fixes
A retry or redirect after an early answer to Expect: 100-continue now opens a new connection, interim responses are also skipped while waiting for 100 Continue, and a URL Client cannot use, such as one with userinfo, gives an invalid client. Only a 407 is passed on from a refused CONNECT, WebSocket::close() sends only a valid payload, and the SSE client stops on an oversized event rather than reconnect to it. Media type parameter names and user extension mappings are matched without case, file content is read in larger chunks from a buffer of its own, the streaming decompression limit reports ExceedMaxPayloadSize, and the tests use the existing single-response server helpers. Comments and the README are brought in line.
This commit is contained in:
1 parent
ceedf6ac22
commit
ae169c6253
5 files changed
+300
-322
No files matched your search
+1
-1
@@ -79,7 +79,7 @@ sse.set_max_reconnect_attempts(10);
|
||||
sse.set_headers({{"Authorization", "Bearer new_token"}});
|
||||
```
|
||||
|
||||
An event, or a line still waiting for its end, longer than `CPPHTTPLIB_SSE_MAX_EVENT_LENGTH` (16MB by default, `0` for no limit) ends the connection with `Error::ExceedMaxPayloadSize`, and the client reconnects as usual.
|
||||
An event, or a line still waiting for its end, longer than `CPPHTTPLIB_SSE_MAX_EVENT_LENGTH` (16MB by default, `0` for no limit) ends the connection with `Error::ExceedMaxPayloadSize`, and the client stops rather than reconnect to the same event. The whole stream also counts against the client's `set_payload_max_length()` (100MB by default), so set it to `0` for a long-lived stream.
|
||||
|
||||
#### Control
|
||||
|
||||
|
||||
Reference in new issue
Block a user