diff --git a/web/src/main/kotlin/cn/tursom/web/router/RoutedHttpHandler.kt b/web/src/main/kotlin/cn/tursom/web/router/RoutedHttpHandler.kt index 157eeee..e15aff6 100644 --- a/web/src/main/kotlin/cn/tursom/web/router/RoutedHttpHandler.kt +++ b/web/src/main/kotlin/cn/tursom/web/router/RoutedHttpHandler.kt @@ -26,7 +26,11 @@ abstract class RoutedHttpHandler( } override fun handle(content: T) { - val handler = router[content.uri].first + val router = getRouter(content.method) + var handler = router[content.uri].first + if (handler == null) { + handler = this.router[content.uri].first + } if (handler != null) { handler(content) } else {