mirror of
https://github.com/azures04/crafatar.git
synced 2026-05-06 19:10:38 +02:00
upper case HTTP status messages
This commit is contained in:
@@ -29,7 +29,7 @@ module.exports = function(req, res) {
|
|||||||
"Content-Type": "text/plain",
|
"Content-Type": "text/plain",
|
||||||
"Response-Time": new Date() - start
|
"Response-Time": new Date() - start
|
||||||
});
|
});
|
||||||
res.end("Invalid size");
|
res.end("Invalid Size");
|
||||||
return;
|
return;
|
||||||
} else if (!helpers.uuid_valid(uuid)) {
|
} else if (!helpers.uuid_valid(uuid)) {
|
||||||
res.writeHead(422, {
|
res.writeHead(422, {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ function asset_request(req, res) {
|
|||||||
fs.readFile(filename, function(err, contents) {
|
fs.readFile(filename, function(err, contents) {
|
||||||
if (err) {
|
if (err) {
|
||||||
res.writeHead(500, {"Content-type" : "text/plain"});
|
res.writeHead(500, {"Content-type" : "text/plain"});
|
||||||
res.end("Internal server error");
|
res.end("Internal Server Error");
|
||||||
} else {
|
} else {
|
||||||
res.writeHead(200, {
|
res.writeHead(200, {
|
||||||
"Content-type" : mime.lookup(filename),
|
"Content-type" : mime.lookup(filename),
|
||||||
@@ -34,7 +34,7 @@ function asset_request(req, res) {
|
|||||||
res.writeHead(404, {
|
res.writeHead(404, {
|
||||||
"Content-type" : "text/plain"
|
"Content-type" : "text/plain"
|
||||||
});
|
});
|
||||||
res.end("Not found");
|
res.end("Not Found");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -72,13 +72,13 @@ function requestHandler(req, res) {
|
|||||||
res.writeHead(500, {
|
res.writeHead(500, {
|
||||||
"Content-Type": "text/plain"
|
"Content-Type": "text/plain"
|
||||||
});
|
});
|
||||||
res.end(config.debug_enabled ? error : "Internal server error");
|
res.end(config.debug_enabled ? error : "Internal Server Error");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
res.writeHead(405, {
|
res.writeHead(405, {
|
||||||
"Content-Type": "text/plain"
|
"Content-Type": "text/plain"
|
||||||
});
|
});
|
||||||
res.end("Method not allowed");
|
res.end("Method Not Allowed");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user