[Pkg-javascript-commits] [node-static] 135/151: Fixed mime lookup. It's not necessary to only pass in the file extension
Tonnerre Lombard
tonnerre-guest at moszumanska.debian.org
Tue Jan 7 23:18:04 UTC 2014
This is an automated email from the git hooks/post-receive script.
tonnerre-guest pushed a commit to branch master
in repository node-static.
commit 6f57aea29619831b8d32e24a8405aba5c55ee6a7
Author: thbaja <thbaja at gmail.com>
Date: Wed Jun 19 16:07:47 2013 +0200
Fixed mime lookup. It's not necessary to only pass in the file extension
---
lib/node-static.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/node-static.js b/lib/node-static.js
index 04603be..f23faa6 100644
--- a/lib/node-static.js
+++ b/lib/node-static.js
@@ -280,7 +280,7 @@ Server.prototype.respondNoGzip = function (pathname, status, contentType, _heade
Server.prototype.respond = function (pathname, status, _headers, files, stat, req, res, finish) {
var contentType = _headers['Content-Type'] ||
- mime.lookup[path.extname(files[0]).slice(1)] ||
+ mime.lookup(files[0]) ||
'application/octet-stream';
if(this.options.gzip) {
this.respondGzip(pathname, status, contentType, _headers, files, stat, req, res, finish);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-static.git
More information about the Pkg-javascript-commits
mailing list