最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - XmlHttpRequest with If-Modified since, webserver returns "400 Bad Request" - Stack Overflow

programmeradmin0浏览0评论

Whenever I use the following code, the webserver (running IIS 7) refuses to send me content, but sends a "400 Bad Request" instead.

request.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");

Whenever I use the following code, the webserver (running IIS 7) refuses to send me content, but sends a "400 Bad Request" instead.

request.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");
Share Improve this question edited Feb 24, 2014 at 13:21 asked Mar 25, 2010 at 16:13 user215361user215361
Add a ment  | 

1 Answer 1

Reset to default 10

Apparently many people are having this problem, and it can easily be fixed by prefixing the date with a 0.

request.setRequestHeader("If-Modified-Since", "Sat, 01 Jan 2000 00:00:00 GMT");

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论