Comparing version 0.3.1 to 0.3.2
10
index.js
@@ -149,3 +149,4 @@ var common = require('common'); | ||
} | ||
response.writeHead(options.status, { | ||
var headers = { | ||
'content-type':mimes.resolve(url), | ||
@@ -155,3 +156,8 @@ 'content-length':stat.size, | ||
'last-modified':stat.mtime.toUTCString() | ||
}); | ||
}; | ||
if (options.cacheMaxAge !== undefined) | ||
headers['Cache-Control'] = 'public, max-age=' + options.cacheMaxAge; | ||
response.writeHead(options.status, headers); | ||
fs.createReadStream(url).pipe(response); | ||
@@ -158,0 +164,0 @@ })); |
{ | ||
"name":"router", | ||
"version":"0.3.1", | ||
"version":"0.3.2", | ||
"description":"A lean and mean web router", | ||
@@ -5,0 +5,0 @@ "contributors": [ |
30165
204