gpt4 book ai didi

http - HTTP 408 和 504 错误有什么区别?

转载 作者:可可西里 更新时间:2023-11-01 15:10:12 26 4
gpt4 key购买 nike

这些都是超时错误,但是在 408 和 504 中谁超时了?

来自 w3 , 408 定义为:

The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.

...而 504 是:

The server, while acting as a gateway or proxy, did not receive a timely response from the upstream server specified by the URI (e.g. HTTP, FTP, LDAP) or some other auxiliary server (e.g. DNS) it needed to access in attempting to complete the request.

如果不是中间服务器,那么谁是 408 中的“客户端”?如果是实际的最终用户,服务器如何知道在他们发出请求之前等待他们的请求?

最佳答案

客户端是浏览器或客户端应用程序。服务器知道等待一个请求,因为它已经接受了一个连接,或者已经读取了请求的一部分,比如一两个 header 。

关于http - HTTP 408 和 504 错误有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36392755/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com