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

Unified Diff: lib/shelf_io.dart

Issue 1030013003: Fix null response handling. (Closed) Base URL: git@github.com:dart-lang/shelf@master
Patch Set: Created 5 years, 9 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 | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/shelf_io.dart
diff --git a/lib/shelf_io.dart b/lib/shelf_io.dart
index 301050f28713f5a4668516c287d02168be74887f..d5eb01760e564752ae492177848b48b6aff4d1ac 100644
--- a/lib/shelf_io.dart
+++ b/lib/shelf_io.dart
@@ -84,7 +84,8 @@ Future handleRequest(HttpRequest request, Handler handler) {
return _logError('Error thrown by handler.\n$error', stackTrace);
}).then((response) {
if (response == null) {
- response = _logError('null response from handler.');
+ return _writeResponse(
+ _logError('null response from handler.'), request.response);
} else if (shelfRequest.canHijack) {
return _writeResponse(response, request.response);
}
« no previous file with comments | « CHANGELOG.md ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698