Chromium Code Reviews| Index: pkg/http/lib/src/streamed_request.dart |
| diff --git a/pkg/http/lib/src/streamed_request.dart b/pkg/http/lib/src/streamed_request.dart |
| index 3570541f653c114ef039d17569a70be98a46eb71..dd538c52ed7211c64fb069cf781da952c2dff603 100644 |
| --- a/pkg/http/lib/src/streamed_request.dart |
| +++ b/pkg/http/lib/src/streamed_request.dart |
| @@ -23,7 +23,10 @@ class StreamedRequest extends BaseRequest { |
| /// buffered. |
| /// |
| /// Closing this signals the end of the request. |
| - final OutputStream stream; |
| + OutputStream get stream => _outputStream; |
| + |
| + /// [stream], stored as a [ListOutputStream]. |
| + final ListOutputStream _outputStream; |
|
Bob Nystrom
2012/12/17 23:55:15
Why did you have to make this change?
nweiz
2012/12/18 00:25:32
Because onData and read() (referred to in the cons
Bob Nystrom
2012/12/18 00:26:25
If those are only in the ctor, how about just maki
nweiz
2012/12/18 19:21:52
I'll do that in a separate CL.
|
| /// The stream from which the [BaseClient] will read the data in [stream] once |
| /// the request has been finalized. |
| @@ -32,12 +35,12 @@ class StreamedRequest extends BaseRequest { |
| /// Creates a new streaming request. |
| StreamedRequest(String method, Uri url) |
| : super(method, url), |
| - stream = new ListOutputStream(), |
| + _outputStream = new ListOutputStream(), |
| _inputStream = new ListInputStream() { |
| // TODO(nweiz): pipe errors from the output stream to the input stream once |
| // issue 3657 is fixed |
| - stream.onData = () => _inputStream.write(stream.read()); |
| - stream.onClosed = _inputStream.markEndOfStream; |
| + _outputStream.onData = () => _inputStream.write(_outputStream.read()); |
| + _outputStream.onClosed = _inputStream.markEndOfStream; |
| } |
| /// Freezes all mutable fields other than [stream] and returns an [InputStream] |