Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 62daed1

Browse files
authored
Create 2018-07-20-HTTP-CODE-408.md
1 parent 8704ba6 commit 62daed1

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

_posts/2018-07-20-HTTP-CODE-408.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
根据rfc介绍
2+
6.5.7. 408 Request Timeout
3+
4+
The 408 (Request Timeout) status code indicates that the server did
5+
not receive a complete request message within the time that it was
6+
prepared to wait. A server SHOULD send the "close" connection option
7+
(Section 6.1 of [RFC7230]) in the response, since 408 implies that
8+
the server has decided to close the connection rather than continue
9+
waiting. If the client has an outstanding request in transit, the
10+
client MAY repeat that request on a new connection.
11+
408(请求超时)状态代码表示服务器在它准备等待的时间内没有收到完整的请求消息。
12+
服务器应该在响应中发送“关闭”连接选项([RFC7230]的第6.1节),因为408意味着
13+
服务器决定关闭连接而不是继续等候。如果客户在途中有未完成的请求,那么客户端可以在新连接上重复该请求。
14+
15+
您的 Web 服务器认为,在 1 )建立客户端和服务器之间 IP 连接(套解字 - socket ), 和 2 )通过该套解字收到数据,之间的时间间隔太长,
16+
所以服务器放弃该连接。 套接字连接实际上已失效 - 您的 Web 服务器已就对该特定套接字连接发出 ' 超时 ' 信号。客户端的请求必须及时重复。
17+
18+
HTTP 循环中的 408 错误
19+
任何客户端在和您的网络服务器通讯时,都需经过以下循环:
20+
21+
从您站点的 IP 名称 ( 即您的网页地址 - URL, 不带起始的 ‘http://') 获得一个 IP 地址。这个对应关系 ( 即由 IP 名称向 IP 地址转换的对应关系 ) 由域名服务器 (DNSs) 提供。
22+
打开一个 IP socket ( 套接字 ) 连接到该 IP 地址。
23+
通过该 socket 写 HTTP 数据流。
24+
从您的网络服务器接受响应的 HTTP 数据流。该数据流包括状态编码, 其值取决于 HTTP 协议 。 解析 该数据流得到 状态编码 和其他有用信息。
25+
该错误在以上所述的最后一步生成,即当客户端收到 HTTP 状态编码 并识别其为 ‘408’ 时。
26+
27+
28+
http://www.checkupdown.com/status/E408_zh.html
29+
https://tools.ietf.org/html/rfc7230#section-6.1
30+
https://tools.ietf.org/html/rfc7231#section-6.5.7

0 commit comments

Comments
 (0)