From 6945c538c3f5703462409c1f216824446fa62a56 Mon Sep 17 00:00:00 2001 From: Tobe O Date: Tue, 28 Nov 2017 16:09:16 -0500 Subject: [PATCH] Strict pushstate --- CHANGELOG.md | 5 ++++- lib/src/virtual_directory.dart | 2 +- pubspec.yaml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 92074220..0871ace9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,7 @@ -# 1.3.1 +# 1.3.0 +* `pushState` uses `strict` mode when `accepts` is passed. + +# 1.3.0-alpha+2 * Added an `accepts` option to `pushState`. * Added optional directory listings. diff --git a/lib/src/virtual_directory.dart b/lib/src/virtual_directory.dart index 939d0a49..dc2a5f2e 100644 --- a/lib/src/virtual_directory.dart +++ b/lib/src/virtual_directory.dart @@ -86,7 +86,7 @@ class VirtualDirectory { if (path == vPath) return new Future.value(true); if (accepts?.isNotEmpty == true) { - if (!accepts.any(req.accepts)) return new Future.value(true); + if (!accepts.any((x) => req.accepts(x, strict: true))) return new Future.value(true); } return servePath(vPath, req, res); diff --git a/pubspec.yaml b/pubspec.yaml index 0b4f06ed..10bf1f72 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,7 +4,7 @@ environment: sdk: ">=1.19.0" homepage: https://github.com/angel-dart/static author: Tobe O -version: 1.3.0-alpha+2 +version: 1.3.0 dependencies: angel_framework: ^1.1.0-alpha file: ^2.0.0