且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

[function.fopen]:无法打开流:HTTP请求失败! HTTP/1.1 401未经授权

更新时间:2022-11-17 10:24:49

10.4.2 401未经授权

10.4.2 401 Unauthorized

该请求需要用户 验证.回应必须 包括一个WWW-Authenticate标头 字段(第14.47节)包含 适用于要求的挑战 资源.客户可以重复 要求获得适当的授权 标头字段(第14.8节).如果 请求已包括授权 凭据,然后返回401响应 表示已获得授权 拒绝提供这些凭证.如果 401响应包含相同 挑战作为优先响应,并且 用户代理已经尝试过 验证至少一次,然后 应该向用户显示实体 这是在回复中给出的,因为 该实体可能包括相关的 诊断信息. HTTP访问 身份验证在"HTTP 身份验证:基本和摘要 访问身份验证" [43].

The request requires user authentication. The response MUST include a WWW-Authenticate header field (section 14.47) containing a challenge applicable to the requested resource. The client MAY repeat the request with a suitable Authorization header field (section 14.8). If the request already included Authorization credentials, then the 401 response indicates that authorization has been refused for those credentials. If the 401 response contains the same challenge as the prior response, and the user agent has already attempted authentication at least once, then the user SHOULD be presented the entity that was given in the response, since that entity might include relevant diagnostic information. HTTP access authentication is explained in "HTTP Authentication: Basic and Digest Access Authentication" [43].

状态代码定义