summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2024-03-16 08:13:29 -0300
committerEuAndreh <eu@euandre.org>2024-03-16 08:13:29 -0300
commit6a16f6a47547ec2b812679fd443014c6fa7dc744 (patch)
tree1fd54f21d4cbc978abe365c88114048c7759efda
parentsrc/web.mjs: Add "WEBSOCKET" route (diff)
downloadpapod-6a16f6a47547ec2b812679fd443014c6fa7dc744.tar.gz
papod-6a16f6a47547ec2b812679fd443014c6fa7dc744.tar.xz
src/hero.mjs: validateUpgrade(): Add note on 405 case
-rw-r--r--src/hero.mjs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/hero.mjs b/src/hero.mjs
index 37858ab..ed3ecd2 100644
--- a/src/hero.mjs
+++ b/src/hero.mjs
@@ -57,6 +57,9 @@ export const validateUpgrade = (method, headers) => {
const version = parseInt(versionStr);
if (!isValidMethod(method)) {
+ /// Unreachable by default, unless one is constructing tables
+ /// manually. Otherwise `findHandler()` will return a 404
+ /// before the request gets here.
return {
isValid: false,
response: {