| Index: sdk/lib/io/http_headers.dart
|
| diff --git a/sdk/lib/io/http_headers.dart b/sdk/lib/io/http_headers.dart
|
| index 1eb3275dded2c7f574aef5c2e757ddc44ab728a1..9d586d4c08fa5a09b3a9e769f93a443eec906cbf 100644
|
| --- a/sdk/lib/io/http_headers.dart
|
| +++ b/sdk/lib/io/http_headers.dart
|
| @@ -50,6 +50,7 @@ class _HttpHeaders implements HttpHeaders {
|
| if (index != -1) {
|
| values.removeRange(index, 1);
|
| }
|
| + if (values.length == 0) _headers.remove(name);
|
| }
|
| }
|
|
|
| @@ -322,8 +323,12 @@ class _HttpHeaders implements HttpHeaders {
|
| void _finalize() {
|
| // If the content length is not known make sure chunked transfer
|
| // encoding is used for HTTP 1.1.
|
| - if (contentLength < 0 && protocolVersion == "1.1") {
|
| - chunkedTransferEncoding = true;
|
| + if (contentLength < 0) {
|
| + if (protocolVersion == "1.0") {
|
| + persistentConnection = false;
|
| + } else {
|
| + chunkedTransferEncoding = true;
|
| + }
|
| }
|
| // If a Transfer-Encoding header field is present the
|
| // Content-Length header MUST NOT be sent (RFC 2616 section 4.4).
|
|
|