| Index: lib/src/request.dart
|
| diff --git a/lib/src/request.dart b/lib/src/request.dart
|
| index 15d8b87a52982ddb5cd5a8180ffa4cd26d10b487..57cfd726f1a8055af9cc987db8aa296b56f7bf4b 100644
|
| --- a/lib/src/request.dart
|
| +++ b/lib/src/request.dart
|
| @@ -119,11 +119,14 @@ class Request extends Message {
|
| Request(String method, Uri requestedUri, {String protocolVersion,
|
| Map<String, String> headers, Uri url, String scriptName,
|
| Stream<List<int>> body, Map<String, Object> context,
|
| - OnHijackCallback onHijack})
|
| - : this._(method, requestedUri, protocolVersion: protocolVersion,
|
| - headers: headers, url: url, scriptName: scriptName,
|
| - body: body, context: context,
|
| - onHijack: onHijack == null ? null : new _OnHijack(onHijack));
|
| + OnHijackCallback onHijack}) : this._(method, requestedUri,
|
| + protocolVersion: protocolVersion,
|
| + headers: headers,
|
| + url: url,
|
| + scriptName: scriptName,
|
| + body: body,
|
| + context: context,
|
| + onHijack: onHijack == null ? null : new _OnHijack(onHijack));
|
|
|
| /// This constructor has the same signature as [new Request] except that
|
| /// accepts [onHijack] as [_OnHijack].
|
| @@ -132,9 +135,8 @@ class Request extends Message {
|
| /// source [Request] to ensure that [hijack] can only be called once, even
|
| /// from a changed [Request].
|
| Request._(this.method, Uri requestedUri, {String protocolVersion,
|
| - Map<String, String> headers, Uri url, String scriptName,
|
| - Stream<List<int>> body, Map<String, Object> context,
|
| - _OnHijack onHijack})
|
| + Map<String, String> headers, Uri url, String scriptName,
|
| + Stream<List<int>> body, Map<String, Object> context, _OnHijack onHijack})
|
| : this.requestedUri = requestedUri,
|
| this.protocolVersion = protocolVersion == null ?
|
| '1.1' : protocolVersion,
|
| @@ -191,7 +193,7 @@ class Request extends Message {
|
| /// removed. Useful for routing middleware that sends requests to an inner
|
| /// [Handler].
|
| Request change({Map<String, String> headers, Map<String, Object> context,
|
| - String scriptName, Uri url}) {
|
| + String scriptName, Uri url}) {
|
| headers = updateMap(this.headers, headers);
|
| context = updateMap(this.context, context);
|
|
|
| @@ -210,8 +212,12 @@ class Request extends Message {
|
| if (scriptName == null) scriptName = this.scriptName;
|
|
|
| return new Request._(this.method, this.requestedUri,
|
| - protocolVersion: this.protocolVersion, headers: headers, url: url,
|
| - scriptName: scriptName, body: this.read(), context: context,
|
| + protocolVersion: this.protocolVersion,
|
| + headers: headers,
|
| + url: url,
|
| + scriptName: scriptName,
|
| + body: this.read(),
|
| + context: context,
|
| onHijack: _onHijack);
|
| }
|
|
|
|
|