Qikuyueser.com

Resumable Downloads Done Right

Added 2026-10

Resumable Downloads Done Right — Chinese original prompt

这个下载接口在 [文件类型或大小范围] 下经常失败重来。请补齐断点续传所需的响应头与范围请求处理,并说明与鉴权、临时链接、缓存策略如何配合。输出:需要的请求与响应头清单、服务端处理范围请求的要点、客户端重试逻辑、以及不支持范围请求时的降级表现。
Site original

Chinese original

Open in ChatGPT

Example

Sample input

这个下载接口在传大视频文件时经常失败重来,帮我补齐断点续传的头和范围请求处理。

The output should include

  • 需要的请求与响应头都列全
  • 范围请求与鉴权临时链接配合
  • 不支持范围请求时的降级表现

Replace these placeholders 1

Swap the bracketed parts for your own details before sending.

  • [文件类型或大小范围]
How to use

鉴权放在临时链接里比放在请求头里更容易支持客户端续传。

Try tweaking it

  • Have it restate requirements and constraints before writing code.
  • Ask for the smallest change plus a rollback path, not a full-file rewrite.

What you should get

  • A minimal, runnable change with copy-ready code
  • Impact list: which files and call sites must follow

Common mistakes

  • Asking it to touch ten files at once, then losing track of what broke what.
  • Pasting only the error, with no code or version, and getting an unfixable answer.

How to check the output

  • The change runs, can be rolled back, and touches nothing unrelated.
  • Edge cases (empty, oversized, concurrent) are covered or explained.

Where it works

  • Good for: having it restate requirements and constraints, then propose the smallest runnable change.
  • Watch out: include versions and a minimal reproduction with the error, or the fix may look plausible but not fit.

More in this topic