首页 > 其他 > 详细

XMLHttpRequest HTTP请求的返回码为0 http status = 0

时间:2014-09-24 11:59:07      阅读:511      评论:0      收藏:0      [点我收藏+]

由于用户在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:

  1. If the state is UNSENT or OPENED, return 0.

  2. If the error flag is set, return 0.

  3. Return the HTTP status code.

XMLHttpRequest HTTP请求的返回码为0 http status = 0

原文:http://www.cnblogs.com/kenkofox/p/3990207.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!