aboutsummaryrefslogtreecommitdiff
path: root/lib/handlers/compile.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlers/compile.js')
-rw-r--r--lib/handlers/compile.js17
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/handlers/compile.js b/lib/handlers/compile.js
index e9b7a0e8c..87632dca6 100644
--- a/lib/handlers/compile.js
+++ b/lib/handlers/compile.js
@@ -338,15 +338,19 @@ export class CompileHandler {
return {source, options, backendOptions, filters, bypassCache, tools, executionParameters, libraries};
}
- handlePopularArguments(req, res, next) {
+ handlePopularArguments(req, res) {
const compiler = this.compilerFor(req);
- if (!compiler) return next();
+ if (!compiler) {
+ return res.sendStatus(404);
+ }
res.send(compiler.possibleArguments.getPopularArguments(this.getUsedOptions(req)));
}
- handleOptimizationArguments(req, res, next) {
+ handleOptimizationArguments(req, res) {
const compiler = this.compilerFor(req);
- if (!compiler) return next();
+ if (!compiler) {
+ return res.sendStatus(404);
+ }
res.send(compiler.possibleArguments.getOptimizationArguments(this.getUsedOptions(req)));
}
@@ -377,7 +381,7 @@ export class CompileHandler {
handleCmake(req, res, next) {
const compiler = this.compilerFor(req);
if (!compiler) {
- return next();
+ return res.sendStatus(404);
}
const remote = compiler.getRemote();
@@ -413,8 +417,9 @@ export class CompileHandler {
handle(req, res, next) {
const compiler = this.compilerFor(req);
if (!compiler) {
- return next();
+ return res.sendStatus(404);
}
+
const remote = compiler.getRemote();
if (remote) {
req.url = remote.path;