diff options
author | Patrick Quist <partouf@gmail.com> | 2022-08-25 21:52:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 21:52:09 +0200 |
commit | 5b485d36e3708e192b63400d3bc30bb22cf33330 (patch) | |
tree | a6db770b803b7b6e82fa7224f331b38b7797f220 /lib/handlers/compile.js | |
parent | 098e0abc4dc870278f1ab4c060c420a5999b54b3 (diff) | |
parent | 16dca9d307220229b80327ea0998c4cecec9137b (diff) | |
download | compiler-explorer-gh-4023.tar.gz compiler-explorer-gh-4023.zip |
Merge branch 'main' into z88dkgh-4023
Diffstat (limited to 'lib/handlers/compile.js')
-rw-r--r-- | lib/handlers/compile.js | 17 |
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; |