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
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Summary
HTTP response size limits — download_file() now enforces a maximum response body size (default 200 KB) to prevent memory exhaustion from malicious or misconfigured servers. Checks Content-Length header for early rejection, then reads body in chunks with a running byte counter as fallback.
ResolveOptions struct — Replaces the timeout + eager_witness_download parameters on resolve() / resolve_owned() with a single options struct that also carries max_response_bytes. This is a breaking API change.
ResponseTooLarge error variant — New DIDWebVHError::ResponseTooLarge { url, max_bytes } for size-limit rejections.
generate_large_did example — Generates a valid 1 MB+ did.jsonl with backdated timestamps for benchmarking. Accepts --url (properly parsed via WebVHURL), --target-kb, and --services flags with full timing output.
resolve example improvements — Now uses clap with --max-size-kb (-l) flag and detailed --help output.
Version bump to 0.4.0 for the breaking resolve() signature change.
Test plan
cargo test — all 396 tests pass including 3 new size-limit tests