| Index: pkg/shelf/lib/src/response.dart
|
| diff --git a/pkg/shelf/lib/src/response.dart b/pkg/shelf/lib/src/response.dart
|
| index 07eba1b4db4e360b59fbf1c04613a1c4c3fa34de..bbdb8b3d73f2d687ab02ec674a268c4b51115e9c 100644
|
| --- a/pkg/shelf/lib/src/response.dart
|
| +++ b/pkg/shelf/lib/src/response.dart
|
| @@ -7,7 +7,6 @@ library shelf.response;
|
| import 'dart:async';
|
| import 'dart:convert';
|
|
|
| -import 'package:collection/wrappers.dart';
|
| import 'package:http_parser/http_parser.dart';
|
|
|
| import 'message.dart';
|
| @@ -221,19 +220,18 @@ Stream<List<int>> _bodyToStream(body, Encoding encoding) {
|
| /// Adds information about [encoding] to [headers].
|
| ///
|
| /// Returns a new map without modifying [headers].
|
| -UnmodifiableMapView<String, String> _adjustHeaders(
|
| +Map<String, String> _adjustHeaders(
|
| Map<String, String> headers, Encoding encoding) {
|
| if (headers == null) headers = const {};
|
| - if (encoding == null) return new UnmodifiableMapView(headers);
|
| + if (encoding == null) return headers;
|
| if (headers['content-type'] == null) {
|
| - return new UnmodifiableMapView(_addHeader(headers, 'content-type',
|
| - 'application/octet-stream; charset=${encoding.name}'));
|
| + return _addHeader(headers, 'content-type',
|
| + 'application/octet-stream; charset=${encoding.name}');
|
| }
|
|
|
| var contentType = new MediaType.parse(headers['content-type'])
|
| .change(parameters: {'charset': encoding.name});
|
| - return new UnmodifiableMapView(
|
| - _addHeader(headers, 'content-type', contentType.toString()));
|
| + return _addHeader(headers, 'content-type', contentType.toString());
|
| }
|
|
|
| /// Adds a header with [name] and [value] to [headers], which may be null.
|
|
|