ebc838c963
The HTTP headers object in request and response objects is now marked as non-mutable when it cannot be changed. An exception will be thrown if trying to mutate headers when they are not mutable. Postponed the sending of the headers until either the first byte of body data is sent or the empty body is indicated. This is to allow getting the output stream object and still be able to set headers until the actual body is touched. Added checking of the number of bytes of body data transmitted when an explicit content length is specified. R=ajohnsen@google.com BUG=none TEST=tests/standalone/src/io/HttpHeadersState.dart,tests/standalone/src/io/HttpContentLengthTest.dart Review URL: https://chromiumcodereview.appspot.com//10232006 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7010 260f80e4-7a28-3924-810f-c04153c831b5