Index: pkg/shelf/lib/src/request.dart |
diff --git a/pkg/shelf/lib/src/request.dart b/pkg/shelf/lib/src/request.dart |
index 75ef8653e1c23c6126ddc5de822bcfa3396d4fb8..f103a66b63fa36d73241067398ba6e9a149c8322 100644 |
--- a/pkg/shelf/lib/src/request.dart |
+++ b/pkg/shelf/lib/src/request.dart |
@@ -68,10 +68,13 @@ class Request extends Message { |
Request(this.pathInfo, String queryString, this.method, |
this.scriptName, this.protocolVersion, this.requestedUri, |
- Map<String, String> headers, {Stream<List<int>> body}) |
+ Map<String, String> headers, {Stream<List<int>> body, |
+ Map<String, Object> context}) |
: this.queryString = queryString == null ? '' : queryString, |
super(new pc.UnmodifiableMapView(new HashMap.from(headers)), |
- body == null ? new Stream.fromIterable([]) : body) { |
+ body == null ? new Stream.fromIterable([]) : body, |
+ new pc.UnmodifiableMapView(new HashMap.from( |
+ context != null ? context: {}))) { |
if (method.isEmpty) throw new ArgumentError('method cannot be empty.'); |
if (scriptName.isNotEmpty && !scriptName.startsWith('/')) { |