diff --git a/lib/src/http/server.dart b/lib/src/http/server.dart index a8cc858d..f9c2d949 100644 --- a/lib/src/http/server.dart +++ b/lib/src/http/server.dart @@ -41,8 +41,9 @@ class Angel extends Routable { this.httpServer = server; server.listen((HttpRequest request) async { - String req_url = - request.uri.toString().replaceAll(new RegExp(r'\/+$'), ''); + String req_url = request.uri.toString().replaceAll(new RegExp(r'\/+$'), ''); + if (req_url.isEmpty) + req_url = '/'; RequestContext req = await RequestContext.from(request, {}, this, null); ResponseContext res = await ResponseContext.from(request.response, this); diff --git a/pubspec.yaml b/pubspec.yaml index 4cce9475..d35f5c76 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,5 +1,5 @@ name: angel_framework -version: 0.0.0-dev.6 +version: 0.0.0-dev.7 description: Core libraries for the Angel framework. author: Tobe O homepage: https://github.com/angel-dart/angel_framework