对于不可用的下载有适当的 HTTP 代码吗?

发布于 2024-11-08 21:40:54 字数 137 浏览 0 评论 0原文

哪个 HTTP 响应代码适合系统上不可用但将来可用的下载。

如果浏览器/下载管理器请求当前系统上不可用的文件(暂时不可用),但我们希望浏览器/DM 稍后重试该文件,则 HTTP 状态代码返回?

Which HTTP response code is appropriate for a download that is not available on the system but it will be available in the future.

If a browser/download manager asks for a file that is not available on the system at the moment (temporary unavailable), but we want the browser/DM to retry later for that file, which HTTP status code to return?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

混浊又暗下来 2024-11-15 21:40:54

10.2.3 202 已接受

该请求已被接受
正在处理,但是处理还没有
已完成。该请求可能或
最终可能不会被采取行动,因为
处理时可能会被禁止
实际上发生了。没有
重新发送状态代码的设施
来自异步操作,例如
这个。

202响应是故意的
不置可否。其目的是让
接受某些请求的服务器
其他进程(也许是
面向批处理的过程仅
每天运行一次)无需
用户代理的连接
服务器一直持续到进程
已完成。返回的实体
该响应应该包括
指示当前请求
状态和一个指向
状态监视器或一些估计
当用户可以预期请求时
待实现。

来源:http://www.w3.org/Protocols/rfc2616/rfc2616-sec10 .html

10.2.3 202 Accepted

The request has been accepted for
processing, but the processing has not
been completed. The request might or
might not eventually be acted upon, as
it might be disallowed when processing
actually takes place. There is no
facility for re-sending a status code
from an asynchronous operation such as
this.

The 202 response is intentionally
non-committal. Its purpose is to allow
a server to accept a request for some
other process (perhaps a
batch-oriented process that is only
run once per day) without requiring
that the user agent's connection to
the server persist until the process
is completed. The entity returned with
this response SHOULD include an
indication of the request's current
status and either a pointer to a
status monitor or some estimate of
when the user can expect the request
to be fulfilled.

Source: http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

李不 2024-11-15 21:40:54

HTTP 404 定义如下:此处

[...]服务器未找到
与 Request-URI 匹配的任何内容。不
是否给出指示
状况是暂时的或永久的。
[...]

HTTP 404 as defined here:

[...] The server has not found
anything matching the Request-URI. No
indication is given of whether the
condition is temporary or permanent.
[...]

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文