Skip to content

Commit

Permalink
failing illegal access date test
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Dec 22, 2015
1 parent 309eb07 commit a0d895b
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions test/illegal-access-date.js
@@ -0,0 +1,24 @@
var test = require('tap').test,
ecstatic = require('../lib/ecstatic'),
http = require('http'),
path = require('path'),
request = require('request');

test('if-modified-since illegal access date', function (t) {
var dir = path.join(__dirname, 'public');
var server = http.createServer(ecstatic(dir))

t.plan(2);

server.listen(0, function () {
var opts = {
url: 'http://localhost:' + server.address().port + '/a.txt',
headers: { 'if-modified-since': '275760-09-24' }
};
request.get(opts, function (err, res, body) {
t.ifError(err);
t.equal(res.statusCode, 200);
server.close(function() { t.end(); });
});
});
});

0 comments on commit a0d895b

Please sign in to comment.