anchor.diff:  import 'package:appengine/appengine.dart';
   import 'package:logging/logging.dart';
   import 'package:path/path.dart' as path;
  +import 'package:pub_server/repository.dart' show UnauthorizedAccessException;
   import 'package:shelf/shelf.dart' as shelf;
   import 'package:shelf/shelf_io.dart' as shelf_io;
   import 'package:stack_trace/stack_trace.dart';
  
positive.code:   bool sanitize = false,
  }) async {
    handler = _uriValidationRequestWrapper(handler);
    handler = _userAuthParsingWrapper(handler);
    if (sanitize) {
      handler = _sanitizeRequestWrapper(handler);
    }
  
negative.code:   };
  }
  
  shelf.Handler _userAuthWrapper(shelf.Handler handler) {
    return (shelf.Request request) async {
      await registerLoggedInUserIfPossible(request);
      try {
        return await handler(request);
      } on UnauthorizedAccessException catch (_) {
        return jsonResponse(
          {
            'message': 'Unauthorized access: try `pub logout` '
                'to re-initialize your login session.',
          },
          status: 401,
          pretty: false,
        );
      }
    };
  }
  
  