anchor.diff:  import 'dart:convert';
   import 'dart:io';
   
  +import 'package:logging/logging.dart';
   import 'package:shelf/shelf.dart' as shelf;
   
   import 'popularity_storage.dart';
  
positive.code: /// The age the browser should cache the static file if there is a hash provided
  /// and it matches the etag.
  const staticLongCache = const Duration(hours: 24);
  
  shelf.Response redirectResponse(String url) => new shelf.Response.seeOther(url);
  
  
negative.code: }
  
  bool isNotModified(shelf.Request request, DateTime lastModified, String etag) {
    try {
      final ifModifiedSince = request.ifModifiedSince;
      if (ifModifiedSince != null &&
          lastModified != null &&
          !lastModified.isAfter(ifModifiedSince)) {
        return true;
      }
  
      final ifNoneMatch = request.headers[HttpHeaders.ifNoneMatchHeader];
      if (ifNoneMatch != null && ifNoneMatch == etag) {
        return true;
      }
    } catch (e, st) {
      // TODO: remove after https://github.com/dart-lang/http_parser/issues/24 gets fixed
      _logger.info('HTTP Header parsing issue detected.', e, st);
    }
  
    return false;
  