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

Unified Diff: lib/src/command/serve.dart

Issue 1790503005: Provide and respect HTTP cache headers in pub serve. (Closed) Base URL: https://github.com/dart-lang/pub.git@master
Patch Set: Revise! Created 4 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 | « lib/src/barback/barback_server.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/command/serve.dart
diff --git a/lib/src/command/serve.dart b/lib/src/command/serve.dart
index 1c41e1464f8db969e80ec708e02358553c73f75f..1094b491669e5033d00a9c92ed3f1a1f9da750f5 100644
--- a/lib/src/command/serve.dart
+++ b/lib/src/command/serve.dart
@@ -150,7 +150,12 @@ class ServeCommand extends BarbackCommand {
padRight("[${server.rootDirectory}]", directoryLength + 2));
server.results.listen((result) {
- if (result.isSuccess) {
+ if (result.isCached) {
+ var prefix = "$directory ${log.green('GET')}";
+ log.collapsible(
+ "$prefix ${result.url.path} $_arrow (cached) ${result.id}",
+ "$prefix Served ## cached assets.");
+ } else if (result.isSuccess) {
var prefix = "$directory ${log.green('GET')}";
log.collapsible("$prefix ${result.url.path} $_arrow ${result.id}",
"$prefix Served ## assets.");
« no previous file with comments | « lib/src/barback/barback_server.dart ('k') | lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698