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( |