| Index: lib/src/request.dart
|
| diff --git a/lib/src/request.dart b/lib/src/request.dart
|
| index 15d8b87a52982ddb5cd5a8180ffa4cd26d10b487..5f6e9604abbee770d340de6c141a3c8e791d7fa4 100644
|
| --- a/lib/src/request.dart
|
| +++ b/lib/src/request.dart
|
| @@ -120,10 +120,14 @@ class Request extends Message {
|
| 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));
|
| + : 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,12 +136,12 @@ 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,
|
| + this.protocolVersion = protocolVersion == null
|
| + ? '1.1'
|
| + : protocolVersion,
|
| this.url = _computeUrl(requestedUri, url, scriptName),
|
| this.scriptName = _computeScriptName(requestedUri, url, scriptName),
|
| this._onHijack = onHijack,
|
| @@ -191,7 +195,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 +214,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);
|
| }
|
|
|
|
|