Skip to content

Releases: rasuvaeff/context-http

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 15 Oct 20:02
a915c42
  • Added: request-scoped values cross services in the W3C baggage header through a rasuvaeff/context WireCodec (#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

Choose a tag to compare

@github-actions github-actions released this 15 Oct 17:47
7592295
  • 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

Choose a tag to compare

@github-actions github-actions released this 15 Oct 16:38
09c15dc
  • Fixed: a deadline passing inside ContextClient::send() could send the
    request with timeout => 0, which curl treats as no timeout;
    PreflightClient could send a budget header of 0. Both now read the
    budget before the final check and throw ContextExpiredException instead
    (#6).
  • Docs: Limitations section in both READMEs.

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 11 Oct 09:38
143eb4a
  • Deadline propagation (#1): ContextMiddleware accepts an optional
    deadlineHeader; an incoming budget in whole milliseconds (1–999999999)
    shortens the configured timeout, a longer or malformed value is ignored.
    PreflightClient and ContextClient take deadlineHeader and send the
    remaining budget downstream.
  • BC — correlation ids (#2): CorrelationId now validates its value
    (1–128 characters of A-Z a-z 0-9 . _ : -), adds isValid() and
    generate(). ContextMiddleware generates an id when the header is
    missing or invalid (injectable correlationIdGenerator), so every request
    has one, and stores it in the context. Both clients take
    correlationHeader to forward it; an explicit header on the request wins.
  • Exception mapping (#3): with an optional responseFactory,
    ContextMiddleware turns ContextExpiredException into expiredStatus
    (504) and ContextCancelledException into cancelledStatus (499); off by
    default. Adds psr/http-factory to 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; sets http_errors => false, so 4xx/5xx responses are
    returned like PSR-18; a transport failure after the budget ran out becomes
    ContextExpiredException with the transport exception as previous.
  • 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

Choose a tag to compare

@rasuvaeff rasuvaeff released this 10 Oct 17:57