From 2790d1fd5469168b94526b03847b5d68ddf428c1 Mon Sep 17 00:00:00 2001 From: Xavier Poinas Date: Mon, 9 Feb 2015 22:56:13 -0500 Subject: [PATCH] Fixed 'If-Modified-Since' date format Hi, My IIS 8.5 server was causing me trouble with the If-Modified-Since header, and returning a 400 code. After investigating it seems that the date should be in RFC822 or RFC1123 format, and both of which require that the day be formatted with a leading 0. Anyway, adding the 0 fixed my problem. Hope that helps someone else. Cheers Xavier --- src/bufferedbinaryajax.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bufferedbinaryajax.js b/src/bufferedbinaryajax.js index f7b2086..cd5709a 100644 --- a/src/bufferedbinaryajax.js +++ b/src/bufferedbinaryajax.js @@ -71,7 +71,7 @@ var BufferedBinaryAjax = function(strUrl, fncCallback, fncError) { oHTTP.setRequestHeader("Range", "bytes=" + aRange[0] + "-" + aRange[1]); } - oHTTP.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 1970 00:00:00 GMT"); + oHTTP.setRequestHeader("If-Modified-Since", "Sat, 01 Jan 1970 00:00:00 GMT"); oHTTP.send(null); } else {