Repository navigation
Releases: rasuvaeff/context-http
Releases · rasuvaeff/context-http
Release list
v0.3.0
- Added: request-scoped values cross services in the W3C
baggageheader through arasuvaeff/contextWireCodec(#9).ContextMiddleware(wireCodec:)reads allow-listed values (invalid ones dropped, never thrown);PreflightClient/ContextClient(wireCodec:) append the context's values, keeping members already present and never overriding a key; percent-encoding and the 8192-byte / 180-member limits. Outgoing baggage is opt-in per client instance — never configure it on a client that calls a third party. - Requires
rasuvaeff/context^0.3. - CI: property regression corpus is cached between runs.
v0.2.2
- Allow
rasuvaeff/context^0.3, so the package installs next to context 0.3. No code changes: nothing used here changed in 0.3 (all additions).
v0.2.1
- Fixed: a deadline passing inside
ContextClient::send()could send the
request withtimeout => 0, which curl treats as no timeout;
PreflightClientcould send a budget header of0. Both now read the
budget before the final check and throwContextExpiredExceptioninstead
(#6). - Docs:
Limitationssection in both READMEs.
v0.2.0
- Deadline propagation (#1):
ContextMiddlewareaccepts an optional
deadlineHeader; an incoming budget in whole milliseconds (1–999999999)
shortens the configured timeout, a longer or malformed value is ignored.
PreflightClientandContextClienttakedeadlineHeaderand send the
remaining budget downstream. - BC — correlation ids (#2):
CorrelationIdnow validates its value
(1–128 characters ofA-Z a-z 0-9 . _ : -), addsisValid()and
generate().ContextMiddlewaregenerates an id when the header is
missing or invalid (injectablecorrelationIdGenerator), so every request
has one, and stores it in the context. Both clients take
correlationHeaderto forward it; an explicit header on the request wins. - Exception mapping (#3): with an optional
responseFactory,
ContextMiddlewareturnsContextExpiredExceptionintoexpiredStatus
(504) andContextCancelledExceptionintocancelledStatus(499); off by
default. Addspsr/http-factoryto the requirements. - BC —
ContextClient(#4): rejects an object without a Guzzle-compatible
request()method at construction; sends the body as its stream and keeps
the protocol version; setshttp_errors => false, so 4xx/5xx responses are
returned like PSR-18; a transport failure after the budget ran out becomes
ContextExpiredExceptionwith the transport exception asprevious. - Requires
rasuvaeff/context^0.2. Package brought up to the monorepo
template (@api,#[Covers], missing repository files,README.ru.md,
release workflow, runnable example).
v0.1.0
Full Changelog: https://github.com/rasuvaeff/context-http/commits/v0.1.0