src/main/kotlin/de/uapcore/lightpit/AbstractServlet.kt

changeset 357
8509308fbbe9
parent 335
1eed60b779da
child 358
e46bef1bdddd
equal deleted inserted replaced
356:b8e6737091a1 357:8509308fbbe9
75 val requestPath = sanitizedRequestPath(req) 75 val requestPath = sanitizedRequestPath(req)
76 val candidates = mappings.filter { it.key.matches(requestPath) } 76 val candidates = mappings.filter { it.key.matches(requestPath) }
77 return if (candidates.isEmpty()) { 77 return if (candidates.isEmpty()) {
78 Pair(PathPattern(requestPath), ::notFound) 78 Pair(PathPattern(requestPath), ::notFound)
79 } else { 79 } else {
80 if (candidates.size > 1) {
81 logger.warn("Ambiguous mapping for request path '{0}'", requestPath)
82 }
83 candidates.entries.first().toPair() 80 candidates.entries.first().toPair()
84 } 81 }
85 } 82 }
86 83
87 private fun invokeMapping( 84 private fun invokeMapping(

mercurial