AshHooks.Http.Bounded (AshHooks v0.2.2)

Copy Markdown View Source

A minimal, memory-bounded HTTP/1.1 client over :gen_tcp/:ssl — the DEFAULT adapter (derisk-2): EVERY read is capped, under all framings, so no response — 2xx or not — can balloon a delivery worker's memory.

What it speaks: exactly what the delivery runtime sends — POST (or the standard verbs), our own headers, Connection: close, no redirects, no keep-alive, no 100-continue. The connection goes to the PINNED, validated address (AshHooks.Http.Target); TLS names the original host.

Bounds (all opt-overridable): header block ≤ :max_header_bytes (32 KiB), body ≤ :max_body_bytes (64 KiB) — Content-Length, chunked, and read-to-close framings alike; a chunked body is CUT at the bound (the remainder is simply not read; the connection closes). Timeouts: connect 5s, receive 15s (the Oban job timeout is the outer bound).

AshHooks.Http.Httpc remains available as an alternative adapter (swap via the worker's :http opt) — its non-2xx streaming limitation is why this module exists as the default.