Comparing version 1.1.0 to 1.1.1
@@ -87,10 +87,13 @@ 'use strict'; | ||
send(req, remote, next) { | ||
var {file_md5, file_size, file_path} = this.get(req.url); | ||
var req_uri = decodeURIComponent(url.parse(req.url).pathname); | ||
var {file_md5, file_size, file_path} = this.get(req_uri); | ||
if(!file_md5) { | ||
console.log('%s missing file in index', req.url); | ||
console.log('%s missing file in index', req_uri); | ||
return next(); | ||
} | ||
var content_type = send.mime.lookup(url.parse(req.url).pathname); | ||
var content_type = send.mime.lookup(req_uri); | ||
remote.setHeader("content-length", file_size); | ||
@@ -97,0 +100,0 @@ remote.setHeader("content-type", content_type); |
{ | ||
"name": "castor", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "An ES7 [CAS designed](https://en.wikipedia.org/wiki/Content-addressable_storage) file storage for nodejs with a simple API and robust implementation.", | ||
@@ -5,0 +5,0 @@ "main": "store.js", |
12285
205