You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- ✅ **Chunked transfer decoding** - Validates framing and exposes parsed trailers
25
25
- ✅ **Optional redirect following** - Follow 301/302/303 (converted to GET) and 307/308 (method preserved)
26
-
- ✅ **Header & body guards** - Limit buffered response headers/body to avoid runaway responses
26
+
- ✅ **Header & body guards** - Limits buffered headers (~2.8 KiB) and body (8 KiB) by default to avoid runaway responses
27
27
- ✅ **Zero-copy streaming** - Combine `req->setNoStoreBody(true)` with `client.onBodyChunk(...)` to stream large payloads without heap spikes
28
28
29
29
> ⚠ Limitations: provide trust material for HTTPS (CA, fingerprint or insecure flag) and remember the full body is buffered in memory unless you opt into zero-copy streaming via `setNoStoreBody(true)`.
- Invoked for every segment (chunk or contiguous data block)
372
-
-The full body is still accumulated internally (future option may allow disabling accumulation)
385
+
-Unless `req->setNoStoreBody(true)` is enabled, the full body is still accumulated internally
373
386
-`final` is invoked just before the success callback
374
387
- Keep it lightweight (avoid blocking operations)
375
388
@@ -378,7 +391,7 @@ Notes:
378
391
379
392
If `Content-Length` is present, the response is considered complete once that many bytes have been received. Extra bytes (if a misbehaving server sends more) are ignored. Without `Content-Length`, completion is determined by connection close.
380
393
381
-
Configure `client.setMaxBodySize(maxBytes)` to abort early when the announced `Content-Length` or accumulated chunk data would exceed `maxBytes`, yielding `MAX_BODY_SIZE_EXCEEDED`. Pass `0`(default) to disable the guard.
394
+
Configure `client.setMaxBodySize(maxBytes)` to abort early when the announced `Content-Length` or accumulated chunk data would exceed `maxBytes`, yielding `MAX_BODY_SIZE_EXCEEDED`. Pass `0` to disable the guard (this applies only when buffering the response body in memory).
382
395
383
396
Likewise, guard against oversized or malicious header blocks via `client.setMaxHeaderBytes(limit)`. When the cumulative response headers exceed `limit` bytes before completion of `\r\n\r\n`, the request aborts with `HEADERS_TOO_LARGE`.
0 commit comments