Skip to content

Commit

Permalink
Set header of response if callback isn't being used.
Browse files Browse the repository at this point in the history
  • Loading branch information
Haynes, Royce L authored and Haynes, Royce L committed Mar 6, 2014
1 parent d06d7d0 commit 62a2670
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,12 +222,12 @@ var Framer = module.exports = function Framer(opts) {
cb = cb === undefined ? null : cb;

uri = require('url').parse(req.url, true).pathname;
res.setHeader('Content-Type', s3res.headers['content-type']);

self._s3Client.deleteFile(uri, function(err, res){
if(cb){
cb(err, res);
} else {
res.setHeader('Content-Type', s3res.headers['content-type']);
res.end(JSON.stringify({statusCode: 200, message: 'File deleted.'}));
}
});
Expand Down

0 comments on commit 62a2670

Please sign in to comment.