@jsenv/server 17.6.2 → 17.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jsenv_server.js +4 -1
- package/package.json +1 -1
- package/src/router/router.js +4 -1
package/dist/jsenv_server.js
CHANGED
|
@@ -6452,7 +6452,10 @@ It should be should be one of route.${routePropertyName}: ${availableValues.join
|
|
|
6452
6452
|
}
|
|
6453
6453
|
}
|
|
6454
6454
|
if (!route.matchMethod(request.method)) {
|
|
6455
|
-
|
|
6455
|
+
// a 405 asserts the resource exists with other methods: a route
|
|
6456
|
+
// matching any resource ("GET *") cannot assert that, so it does
|
|
6457
|
+
// not turn an unknown resource into a 405
|
|
6458
|
+
if (!route.isFallback && route.resource !== "*") {
|
|
6456
6459
|
wouldHaveMatched.methodSet.add(route.method);
|
|
6457
6460
|
}
|
|
6458
6461
|
continue;
|
package/package.json
CHANGED
package/src/router/router.js
CHANGED
|
@@ -355,7 +355,10 @@ It should be should be one of route.${routePropertyName}: ${availableValues.join
|
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
357
|
if (!route.matchMethod(request.method)) {
|
|
358
|
-
|
|
358
|
+
// a 405 asserts the resource exists with other methods: a route
|
|
359
|
+
// matching any resource ("GET *") cannot assert that, so it does
|
|
360
|
+
// not turn an unknown resource into a 405
|
|
361
|
+
if (!route.isFallback && route.resource !== "*") {
|
|
359
362
|
wouldHaveMatched.methodSet.add(route.method);
|
|
360
363
|
}
|
|
361
364
|
continue;
|