v0.1.4+1
The tiniest of tweaks
diff --git a/lib/shelf_static.dart b/lib/shelf_static.dart
index ebdea75..4fb0803 100644
--- a/lib/shelf_static.dart
+++ b/lib/shelf_static.dart
@@ -57,19 +57,19 @@
file = _tryDefaultFile(requestedPath, defaultDocument);
}
- if (file == null) {
- return new Response.notFound('Not Found');
- }
-
if (!serveFilesOutsidePath) {
var resolvedPath = file.resolveSymbolicLinksSync();
// Do not serve a file outside of the original fileSystemPath
if (!p.isWithin(fileSystemPath, resolvedPath)) {
- return new Response.notFound('Not Found');
+ file = null;
}
}
+ if (file == null) {
+ return new Response.notFound('Not Found');
+ }
+
if (fileType == FileSystemEntityType.DIRECTORY &&
!request.url.path.endsWith('/')) {
// when serving the default document for a directory, if the requested
diff --git a/pubspec.yaml b/pubspec.yaml
index ddb208e..08c01fb 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -1,5 +1,5 @@
name: shelf_static
-version: 0.1.4
+version: 0.1.4+1
author: Kevin Moore <github@j832.com>
description: Static file server support for Shelf
homepage: https://github.com/kevmoo/shelf_static.dart