| Index: runtime/bin/http_impl.dart
|
| diff --git a/runtime/bin/http_impl.dart b/runtime/bin/http_impl.dart
|
| index ffe4563615fc3f88ff4147d34a447c44f1642841..58f0bbaf163a7dc58da5760eaffd80ab4a87bb70 100644
|
| --- a/runtime/bin/http_impl.dart
|
| +++ b/runtime/bin/http_impl.dart
|
| @@ -399,6 +399,8 @@ class _HttpRequest extends _HttpRequestResponseBase implements HttpRequest {
|
| return _inputStream;
|
| }
|
|
|
| + String get protocolVersion() => _protocolVersion;
|
| +
|
| void _onRequestStart(String method, String uri, String version) {
|
| _method = method;
|
| _uri = uri;
|
| @@ -610,6 +612,11 @@ class _HttpResponse extends _HttpRequestResponseBase implements HttpResponse {
|
| bool _writeHeader() {
|
| List<int> data;
|
|
|
| + // HTTP/1.0 does not support chunked.
|
| + if (_protocolVersion == "1.0" && _contentLength < 0) {
|
| + throw new HttpException("Content length required for HTTP 1.0");
|
| + }
|
| +
|
| // Write status line.
|
| if (_protocolVersion == "1.1") {
|
| _httpConnection._write(_Const.HTTP11);
|
|
|