HTTP状态码416

title

HTTP状态码416表示“请求范围不符合要求”。它通常在客户端请求部分资源时使用,但服务器无法提供请求的范围。这可能是因为范围无效,超出了资源的长度,或者资源已被删除。

以下是HTTP 416错误响应的示例:

HTTP/1.1 416 Requested Range Not Satisfiable
Date: Fri, 05 Mar 2021 06:30:20 GMT
Content-Range: bytes */1000
Content-Length: 35
Connection: close
Content-Type: text/html

<!DOCTYPE html>
<html>
<head>
    <title>416 Requested Range Not Satisfiable</title>
</head>
<body>
    <h1>Requested Range Not Satisfiable</h1>
    <p>The requested range is not valid or exceeds the size of the resource.</p>
</body>
</html>

在此示例中,服务器返回HTTP 416错误响应,并指示请求的范围不符合要求,因此无法满足请求。响应中包含Content-Range头字段,用于指示服务器支持的范围大小。客户端应更改请求的范围,以便服务器可以提供所需的部分资源。

powered by Gitbook© 2023 编外计划 | 最后修改: 2023-11-24 03:36:58

results matching ""

    No results matching ""