由于用户在http返回前关闭/取消,或者防火墙等原因,会造成http请求没有status信息。w3c有相应的说明:http://www.w3.org/TR/XMLHttpRequest/#the-status-attribute
4.7.1 The status
attribute
client . status
-
Returns the HTTP status code.
The status
attribute must return the result of running these steps:
- If the state is UNSENT or OPENED, return 0.
- If the error flag is set, return 0.
- Return the HTTP status code.
时间: 2024-11-11 10:34:33