Skip to content

Commit ff5f41a

Browse files
committed
comment
1 parent 3d4b688 commit ff5f41a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkgs/shelf_router/lib/src/router.dart

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ class Router {
157157

158158
// first slash is always in request.handlerPath
159159
final path = prefix.substring(1);
160+
161+
// Prefix it with two underscores to avoid conflicts
162+
// with user defined path parameters
160163
const pathParam = '__path';
164+
161165
if (prefix.endsWith('/')) {
162166
_all(
163167
prefix + '<$pathParam|[^]*>',

0 commit comments

Comments
 (0)