createRequestContext method

  1. @override
Future<GopherRequestContext> createRequestContext (
  1. GopherRequest request,
  2. GopherRequest response
)
override

Implementation

@override
Future<GopherRequestContext> createRequestContext(
    GopherRequest request, GopherRequest response) {
  var path = request.path.replaceAll(_straySlashes, '');
  if (path.isEmpty) path = '/';
  return Future.value(
      GopherRequestContext(request, app.container.createChild(), path));
}