Comparing version 0.0.7 to 0.1.0
@@ -6,3 +6,3 @@ var fs = require('fs') | ||
, path = require('path') | ||
, mimetypes = require('./mimetypes') | ||
, mime = require('mime') | ||
, rfc822 = require('./rfc822') | ||
@@ -34,3 +34,3 @@ ; | ||
this.mimetype = options.mimetype || mimetypes.lookup(this.path.slice(this.path.lastIndexOf('.')+1)) | ||
this.mimetype = options.mimetype || mime.lookup(this.path.slice(this.path.lastIndexOf('.')+1)) | ||
@@ -157,3 +157,3 @@ var stopBuffering = function () { | ||
self.path = path.join(self.path, self.index) | ||
self.mimetype = mimetypes.lookup(self.path.slice(self.path.lastIndexOf('.')+1)) | ||
self.mimetype = mime.lookup(self.path.slice(self.path.lastIndexOf('.')+1)) | ||
fs.stat(self.path, finish) | ||
@@ -184,2 +184,3 @@ return | ||
// stream.Stream.prototype.pipe.call(this, dest, options) | ||
return dest | ||
} | ||
@@ -186,0 +187,0 @@ File.prototype.write = function (chunk, encoding) { |
{ | ||
"name": "filed", | ||
"description": "Simplified file library.", | ||
"version": "0.0.7", | ||
"version": "0.1.0", | ||
"repository": { | ||
@@ -13,4 +13,9 @@ "type": "git", | ||
}, | ||
"scripts": {"test": "node test/test.js"}, | ||
"dependencies": { | ||
"mime": ">= 1.2.6" | ||
}, | ||
"scripts": { | ||
"test": "node test/test.js" | ||
}, | ||
"main": "./main" | ||
} |
@@ -157,3 +157,3 @@ var filed = require('../main') | ||
assert.equal(resp.statusCode, 200) | ||
assert.equal(resp.headers['content-type'], 'text/javascript') | ||
assert.equal(resp.headers['content-type'], 'application/javascript') | ||
console.log("Passed GET file without piping request") | ||
@@ -160,0 +160,0 @@ }) |
35743
1
10
417
+ Addedmime@>= 1.2.6
+ Addedmime@4.0.4(transitive)