diff --git a/CHANGELOG.md b/CHANGELOG.md index b0005516..c8f6c679 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # 1.1.4+9 * Patch `ResponseContext.redirectTo` to `fold` parameters, instead of `as`-casting them to `Map`. +* Apply this same folding to `ResponseContext.redirectToAction`. # 1.1.4+8 * Finalizers can now write to the response buffer or send headers, diff --git a/lib/src/core/response_context.dart b/lib/src/core/response_context.dart index 66d294eb..19132f7a 100644 --- a/lib/src/core/response_context.dart +++ b/lib/src/core/response_context.dart @@ -303,7 +303,9 @@ abstract class ResponseContext implements StreamSink>, StringSink { final head = controller.findExpose().path.toString().replaceAll(_straySlashes, ''); final tail = matched - .makeUri(params as Map) + .makeUri(params.keys.fold>({}, (out, k) { + return out..[k.toString()] = params[k]; + })) .replaceAll(_straySlashes, ''); redirect('$head/$tail'.replaceAll(_straySlashes, ''), code: code); diff --git a/pubspec.yaml b/pubspec.yaml index 9d806e86..7c6af27c 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_framework -version: 1.1.4+8 +version: 1.1.4+9 description: A high-powered HTTP server with DI, routing and more. author: Tobe O homepage: https://github.com/angel-dart/angel_framework