A download can ask for only part of a file, as happens when resuming a transfer. HTTP byte ranges describe positions in the representation's bytes, with both endpoints included. The server may also ignore Range. Before discussing a server response, it helps to see exactly what the request selects.
HTTP Range Desk is a small, browser-local response planner. Its default example describes a ten-byte file and asks for bytes=0-4,3-8. The two parts select five and six bytes: eleven selected bytes, nine unique bytes, two repeated bytes. The overlap does not make the original file longer. The tool preserves the two requested parts and shows their union separately.
You can inspect large offsets without rounding them to JavaScript Numbers, see how a malformed sibling or a failed If-Range changes this declared plan, and optionally bind a local file to compare complete slice hashes. A byte range may cut through a UTF-8 character; the tool keeps byte positions separate from characters.
This is an explicit bounded teaching profile, not a downloader or HTTP server. It does not contact a target URL, discover validator strength, authenticate metadata, assemble multipart wire bodies or certify a remote server. No model or training is involved. Supplied metadata remains an assertion; local bytes and their observed hashes are labelled separately. Local-file exports contain complete request details and selected-slice information.
断点续传通常只请求文件的一部分。HTTP Range 用字节位置描述这部分内容,起点和终点都算在内;服务器也可以选择忽略 Range。先把请求到底选中了什么算清楚,才能讨论后续响应。
这个本地浏览器工具用十字节文件作默认例子:bytes=0-4,3-8 分别选中五字节和六字节,合计十一字节,其中只有九字节不同、两字节重复。文件本身没有变长。工具保留请求的两个部分,并把用于诊断的合并区间单独列出。
还可以查看大整数偏移、畸形成员和 If-Range 不匹配时的计划,或绑定本地文件,核对完整切片哈希。字节区间可以截断一个 UTF-8 字符,字节位置不能直接当作字符位置。
这是有限规则下的响应计划工具,不会访问目标服务器。元数据和日期强度由使用者提供,不代表已验证的远端事实;不组装 multipart 网络报文,不作服务器兼容性认证。没有模型或训练,本地导出包含请求及切片信息。
The complete frozen technical documentation follows unchanged. Its local-candidate wording describes the original review stage; current hosted qualification and distribution require separate public evidence.
Inspect byte ranges, validators and overlapping parts locally. The tool keeps inclusive HTTP positions separate from exclusive array endpoints, handles large offsets as exact decimal integers and can verify slices against a local binary file.
Renchao Wu · work:http-range-desk:v1 · version 0.1.0. Original code, fixtures and sample bytes are Apache-2.0. This package is a local candidate; it does not establish public hosting or adoption.
HTTP range handling is optional. A server may ignore Range, coalesce parts or reject excessive requests. This tool makes a declared set of choices and shows the resulting response plan. It does not fetch a target URL, implement an HTTP server, verify remote behavior or certify RFC conformance.
The default request describes a ten-byte representation and asks for bytes=0-4,3-8. It retains both parts in request order: eleven selected payload bytes, nine unique bytes and two repeated overlap bytes. The diagnostic union does not rewrite the request. Multipart boundaries and part headers are not assembled, so the plan does not invent a wire-body length or a multipart Content-Length.
Length, ETag, Last-Modified, date strength and the outcome of other preconditions are supplied metadata. The tool neither discovers these values nor authenticates them. In particular, base_status 304 or 412 means that the caller says another precondition has already produced that outcome. The tool does not evaluate If-Match, If-None-Match, authentication or content negotiation.
| Input | Result in this profile |
|---|---|
| Valid GET byte ranges with satisfiable parts | 206 plan; retain every satisfiable part, including duplicates |
| All parts unsatisfiable on a nonempty representation | 416 plan with bytes */length |
| One malformed member among otherwise valid members | Ignore the entire Range and plan a full 200 |
| Unknown range unit | Ignore Range and plan a full 200 |
| HEAD | Ignore Range; select no representation body |
| Supplied base_status 304 or 412 | Preserve that outcome; do not evaluate Range or If-Range |
| Weak or mismatched If-Range entity tag | Ignore Range and plan a full 200 |
| If-Range date one second later than Last-Modified | No exact match; full 200, even when the date is strong |
| Nonzero suffix on an empty representation | Semantically satisfiable; this profile chooses the permitted empty-representation ignore policy and plans 200 with zero selected bytes |
| Processing limit or unsupported date syntax | Outside-profile diagnostic; no invented response status |
An If-Range date is accepted only when the caller explicitly asserts a strong date and it exactly matches the supplied Last-Modified value. This differs from an earlier-than-or-equal conditional comparison. Strength is an assertion here, not inferred from the timestamp. ETag comparison requires both tags to be strong and their opaque values to match.
A nonzero suffix on an empty representation is a deliberate edge case from RFC 9110. Its resolved empty interval has first 0, exclusive end 0, length 0 and no last byte. The tool does not invent an offset of −1. The semantic analysis and the optional response policy remain separate.
Serve this directory with a local static server, then open its address. Eight original examples cover overlap, partial UTF-8 byte slices, an empty file, huge offsets, date mismatch, a malformed sibling, 304 precedence and an all-byte binary sample. The page fetches its own local example assets; it makes no request to a target server. Direct JSON planning remains available if the example inventory fails to load.
Edit the request JSON and choose Compute range plan, or press Ctrl+Enter. Every parsed member remains in the full report, including empty list entries, unsatisfiable ranges and malformed members. When a processing cap stops inspection, the report says the analysis is incomplete and preserves the full original header. Display filters do not truncate downloads.
The request's representation length must be a canonical decimal string from 0 to 2⁶³−1. Range numbers may contain up to 256 digits. All offset arithmetic uses BigInt and exports decimal strings. The profile permits up to 64 nonempty range members and 64 ignored empty list members. These are processing bounds, not limits on HTTP itself. Exact supported input and policy order are in STATIC-API.md.
Optionally choose a local file up to 1 MiB. It is read locally and never uploaded. Choosing it does not change the request: use Use local file length explicitly, then compute. A length mismatch is rejected. File names and filesystem timestamps are not used as ETags or HTTP dates.
With actual bytes bound, the report includes their SHA-256 and, for each selected interval, the observed slice size, complete slice hash and a preview of its first 32 hexadecimal bytes. Without local bytes it reports no observed file or slice hash. Byte ranges apply to the encoded representation's octets; a slice may split an emoji or another UTF-8 character. The tool does not decode and then pretend character positions were byte offsets.
Clear removes the request, file binding, results and exports. A newer edit or clear action supersedes a pending file read, sample load or computation. A late example inventory response also preserves a previously computed report or file binding. The real delayed-success and HTTP-503 observations are included in the validation evidence.
Download JSON preserves the exact request snapshot, diagnostics, selected parts, diagnostic union and all observed slice information. Download parts CSV contains only selected intervals; it is a declared subset, not the whole diagnostic report. Both use the current complete report regardless of a display filter. Use JSON or a text-preserving CSV import for huge offsets; a spreadsheet can otherwise coerce decimal text and lose precision.
node cli.mjs default-request.json /absolute/path/to/new-report.json
node cli.mjs request.json /absolute/path/to/another-report.json fixtures/payloads/all-bytes.bin
The optional file must have exactly the length asserted in the request. Inputs must be observed regular files within their caps. The CLI creates a new report exclusively with mode 0600 and preserves an existing output. This does not promise hostile-filesystem race resistance or atomicity; a failed write can leave a new partial file. Success exits 0; rejected invocations exit 2.
The implementation requires a JavaScript runtime with BigInt and Web Crypto; browser testing used the trusted hidden browser interface. The Python independent verifier uses only the standard library. No model or training dependency is needed.
The contract and 314 expected cases were frozen before the production core. A separate character parser and byte-membership oracle compared those complete reports and 8,375 additional reports exactly. The package also contains real file-chooser/download evidence and a seven-request local standard-library server observation: that server ignored Range and returned full 200 responses. Its behavior is a concrete reason not to treat the planner as a remote-response guarantee.
For saved-evidence replay, make a complete separate writable copy, remove only that copy's MANIFEST.json and run python3 run_checks.py. The runner refuses a frozen package. Replaying downloaded evidence is not a new browser run. The pre-implementation fixture generator is historical source and refuses to run when the production core exists; do not regenerate a frozen expected bank.
VALIDATION.md records actual checks and harness limitations. SOURCES.md identifies the primary RFC sections and NOTICE records author-owned helper reuse. File hashes and a package inventory verify bytes, not metadata authenticity, privacy, server behavior or public adoption.