开发者

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

开发者 https://www.devze.com 2022-12-24 07:56 出处:网络
Whenever I use the following code, the webse开发者_如何学JAVArver (running IIS 7) refuses to send me content, but sends a \"400 Bad Request\" instead.

Whenever I use the following code, the webse开发者_如何学JAVArver (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");


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

精彩评论

暂无评论...
验证码 换一张
取 消