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

Unified Diff: pkg/shelf/lib/src/handlers/logger.dart

Issue 260933004: Support Request hijacking in Shelf, using a similar API to Rack. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 7 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 | « pkg/shelf/lib/shelf_io.dart ('k') | pkg/shelf/lib/src/hijack_exception.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/shelf/lib/src/handlers/logger.dart
diff --git a/pkg/shelf/lib/src/handlers/logger.dart b/pkg/shelf/lib/src/handlers/logger.dart
index 2e95cf99268fec4f505e8414de26282f110a96c7..e949c9bc29c22a461feb834f778e9c61f8f3f71e 100644
--- a/pkg/shelf/lib/src/handlers/logger.dart
+++ b/pkg/shelf/lib/src/handlers/logger.dart
@@ -6,6 +6,7 @@ library shelf.handlers.logger;
import 'package:stack_trace/stack_trace.dart';
+import '../hijack_exception.dart';
import '../middleware.dart';
import '../util.dart';
@@ -37,6 +38,8 @@ Middleware logRequests({void logger(String msg, bool isError)}) =>
return response;
}, onError: (error, stackTrace) {
+ if (error is HijackException) throw error;
+
var msg = _getErrorMessage(startTime, request.url, request.method,
watch.elapsed, error, stackTrace);
« no previous file with comments | « pkg/shelf/lib/shelf_io.dart ('k') | pkg/shelf/lib/src/hijack_exception.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698