mirror of
https://github.com/azures04/crafatar.git
synced 2026-03-22 07:51:17 +01:00
rename contents to file_buffer for clarity
This commit is contained in:
parent
f031616984
commit
341eb5b41b
@ -18,16 +18,16 @@ function asset_request(req, res) {
|
||||
var filename = __dirname + "/public/" + req.url.pathname;
|
||||
fs.exists(filename, function(exists) {
|
||||
if (exists) {
|
||||
fs.readFile(filename, function(err, contents) {
|
||||
fs.readFile(filename, function(err, file_buffer) {
|
||||
if (err) {
|
||||
res.writeHead(500, {"Content-type" : "text/plain"});
|
||||
res.end("Internal Server Error");
|
||||
} else {
|
||||
res.writeHead(200, {
|
||||
"Content-type" : mime.lookup(filename),
|
||||
"Content-Length": contents.length
|
||||
"Content-Length": file_buffer.length
|
||||
});
|
||||
res.end(contents);
|
||||
res.end(file_buffer);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user