The socket errors and HTTP parser errors are now handled by the
HTTP library and propagated to the related onError callback.
For HttpClient there is no onError on the HttpClient object
itself. Errors on active connections (including connection
errors) are reported on the HttpClientConnection. Errors on
connections sitting in the keep alive pool are handled by just
closing the connection and removing it from the pool. Errors on
the HttpClientConnection are also reported through the onError
callbacks on any active streams.
I am not particulair happy of the way errors are propagated to
the active streams but that can be refactored later.
Added more checks and tests to the HTTP parser.
R=ager@google.com, ajohnsen@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9834008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5768 260f80e4-7a28-3924-810f-c04153c831b5
Change the streams onError callbacks to get an Exception argument on
all streams.
Added actual error handling to the socket streams.
As it is difficult to determine where an error should be reported I
decided to call all the registered onError callbacks, that is on the
socket itself and on both input and output stream.
Did some additional cleanup of the naming of OnError argument in some tests.
R=ager@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9812007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5717 260f80e4-7a28-3924-810f-c04153c831b5
All output streams now supports writeString which takes the encoding
to be used when transforming the string into a sequence of bytes.
This change also introduces an Encoding interface and Encodings class
as a repository for the supported encodings. Currently this is only
UTF-8, ISO-8859-1 and ASCII. All methods in dart:io which previously
used a String to represent the encoding now uses objects implementing
Encoding.
In this change dart:io is still using the internal UTF-8 encoder used
by the HTTP implementation. I will look into using the one in dart:utf
in a separate change.
R=ager@google.com
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com//9653026
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@5231 260f80e4-7a28-3924-810f-c04153c831b5