Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Unified Diff: lib/src/util/path_handler.dart

Issue 1290763003: Drop support for old SDK and shelf versions. (Closed) Base URL: git@github.com:dart-lang/test@master
Patch Set: Code review changes Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/util/one_off_handler.dart ('k') | lib/src/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/util/path_handler.dart
diff --git a/lib/src/util/path_handler.dart b/lib/src/util/path_handler.dart
index ea3d6206d5307e3d0a8ffad83835c6b046f4e8eb..9a7312f58f16b68cd42ecee5f2ac727d3056f843 100644
--- a/lib/src/util/path_handler.dart
+++ b/lib/src/util/path_handler.dart
@@ -7,8 +7,6 @@ library test.util.path_handler;
import 'package:path/path.dart' as p;
import 'package:shelf/shelf.dart' as shelf;
-import '../utils.dart';
-
/// A handler that routes to sub-handlers based on exact path prefixes.
class PathHandler {
/// A trie of path components to handlers.
@@ -35,7 +33,7 @@ class PathHandler {
var handler;
var handlerIndex;
var node = _paths;
- var components = p.url.split(shelfUrl(request).path);
+ var components = p.url.split(request.url.path);
for (var i = 0; i < components.length; i++ ) {
node = node.children[components[i]];
if (node == null) break;
@@ -46,7 +44,7 @@ class PathHandler {
if (handler == null) return new shelf.Response.notFound("Not found.");
- return handler(shelfChange(request,
+ return handler(request.change(
path: p.url.joinAll(components.take(handlerIndex + 1))));
}
}
« no previous file with comments | « lib/src/util/one_off_handler.dart ('k') | lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698