File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
pkgs/shelf_router/lib/src Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -197,17 +197,18 @@ class Router {
197197 Future <Response > _invokeMountedHandler (
198198 Request request, Function handler, List <String > pathParams) async {
199199 final paramsMap = request.params;
200- final effectivePath = _replaceParamsInPath (request.url.path, paramsMap);
200+ final effectivePath = _getEffectiveMountPath (request.url.path, paramsMap);
201201
202202 return await Function .apply (handler, [
203203 request.change (path: effectivePath),
204204 ...pathParams.map ((param) => paramsMap[param]),
205205 ]) as Response ;
206206 }
207207
208- /// Replaces the variable slots (<someVar>) from [path] with the
209- /// values from [paramsMap]
210- String _replaceParamsInPath (
208+ /// Removes the "rest path" from the requested url in mounted routes. This
209+ /// new path is then used to update the scope of the mounted handler with
210+ /// [Request.change]
211+ String _getEffectiveMountPath (
211212 String urlPath,
212213 Map <String , String > paramsMap,
213214 ) {
You can’t perform that action at this time.
0 commit comments