fixed Content-Header syntax

This commit is contained in:
bill bittner 2017-06-14 13:04:55 -07:00
parent 64b1b720ae
commit 3047d4d997

View file

@ -1,7 +1,7 @@
function serveFile(fileInfo, res){
var options = {
root: fileInfo.directory,
headers: { "contentType": fileInfo.contentType}
headers: { "Content-Type": fileInfo.contentType}
};
switch (fileInfo.contentType){
case "image/jpeg":
@ -18,7 +18,7 @@ function serveFile(fileInfo, res){
break;
default:
console.log("sending unknown file type as .jpeg");
options["headers"]["contentType"] = "image/jpeg";
options["headers"]["Content-Type"] = "image/jpeg";
break;
}
console.log('options', options);