Commit graph

742 commits

Author SHA1 Message Date
ajohnsen@google.com ce266f9435 Merge all http-outgoing transfomers into _HttpOutgoing, including simpler(better) buffering.
This speeds up the system by:
- Using a simpler buffering mechanism, where we fill up a 8kb buffer, pass it on, and allocating a new.
- Avoiding up to 4 streams for each stream added to the http-outgoing. We now only create one extra stream.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//185543004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33272 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-04 13:58:46 +00:00
ajohnsen@google.com fc5af7b7b4 Add InternetAddress:rawAddress, to return the raw address as a list of bytes.
BUG=https://code.google.com/p/dart/issues/detail?id=17137
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//180163005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33235 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-03 18:33:56 +00:00
ajohnsen@google.com a22e98f539 [ZLIB] Add support for windowBits, memLevel, raw
BUG=159367

**BC breaks:**
All public (API) classes that used to be const are not const any more. This allow checking the validity of input parameters in the constructor body.
- ZLibCodec,
- GZipCodec,
- ZLibEncoder,
- ZLibDecoder
The globals codecs GZIP and ZLIB are now final we should be ok (the class contain only final properties, ie no state).

What should be done:
(- finer grained exceptions, -> later change)
(- Handle the flush modes but probably in an other patch as the updates might be more complex.)

Done:

Patch Set #1
- add some more docs,
- support for memLevel.

Patch Set #2:
- implement dictionaries (todo: fix mem management),
- integrate review feedback,
- fix CC,
- rebased on master

Patch Set #4:
- support for strategy,
- add some checks (ie checking the level, memLevel, ...) this could imply adding a constructor body (Codecs, Coders) but this would force making the const non const and break BC, thoughts ?
- Add ZLIB constants Dart side.
- Refactor the tests and test only some levels rather all which was unit testing rather more than the extension. It saves some test time.

Patch Set #8:
- fix mem management for dictionaries,

R=ajohnsen@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//130513003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33206 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-03 11:43:09 +00:00
kevmoo@google.com a58497d94d dart:io http - remove (read-only) comments in explicitly read-only properties.
BUG= https://code.google.com/p/dart/issues/detail?id=17196
R=ajohnsen@google.com, kathyw@google.com

Review URL: https://codereview.chromium.org//183783004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33160 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-28 15:51:47 +00:00
mcampione@google.com 1117170d2e class-level docs for several dart:io classes
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//159713011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33023 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-25 17:25:49 +00:00
ajohnsen@google.com 1e29cf8f87 Only use one timer to handle HttpServer::idleTimeout.
This makes us avoid a lot of timer allocations/cancels by default.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//176893003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32965 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 14:35:25 +00:00
ajohnsen@google.com 416678d4f3 Don't set serverHeader by default.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//177843002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32962 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-24 14:28:10 +00:00
ajohnsen@google.com 04c6eca951 Slightly speed up http-parser and http-header-writing.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//173683002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32850 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-20 14:47:25 +00:00
ajohnsen@google.com 02d58f890d Always present data from http through a view.
This avoids sending out different data typed, thus provoking polymorphic
code.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//172443002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32793 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 14:45:10 +00:00
ajohnsen@google.com b15ec57f4f Clean up usage of streams in http-parser.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//171403003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32790 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 13:27:47 +00:00
ajohnsen@google.com 2cf11a443f Fix Windows event-handler, where write can 'complete' with 0 bytes written.
To match our design, we now treat this as a success write, as we expect the error to come on next issued write (which is exactly what happens).

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//172363002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32788 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 13:22:46 +00:00
ajohnsen@google.com 59feb2f848 Fix secure socket filter after edge-triggering.
The read events would happen through the microtask-queue, thus blocking
the filter from returning. We now pause for read events when buffer is
full, and continue when the filter is done processing.

BUG=
R=whesse@google.com

Review URL: https://codereview.chromium.org//170843010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32782 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 10:46:45 +00:00
ajohnsen@google.com 140fddd06e Make event-handlers edge-triggered and move socket-state to Dart.
This eliminates to pause/resume calls made in the previous one-shot based model.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//169383003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32780 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-19 09:44:26 +00:00
sgjesse@google.com f0bddc920e Allow HTTP response without reason phrase
Turns out some HTTP servers does not adhere to the spec when sending
response messages. This issue was found with the AppEngine
dev_appserver which does not send a reason phrase for some requests.

R=ajohnsen@google.com
BUG=http://dartbug.com/16756

Review URL: https://codereview.chromium.org//169723003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32727 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-17 14:54:24 +00:00
ajohnsen@google.com 0f52be7f63 Make std* blocking file-descriptors.
This will most likely be a performance regression when piping, that
we'll have to look into in the future (copying data through
    message-passing).

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//154273003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32715 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-17 10:06:35 +00:00
ajohnsen@google.com aa98b4ab11 Remove unneeded pause on Socket in HTTP.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//152233004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32599 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-12 13:53:00 +00:00
ajohnsen@google.com 789741c0bf Make File, Link and Directory extend, not implement, FileSystemEntity.
BUG=
R=kasperl@google.com

Review URL: https://codereview.chromium.org//159933008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32594 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-12 07:34:48 +00:00
sgjesse@google.com e8c1b76526 Change RawSocket.secureServer and RawSoccket.secure to fail on paused subscriptions
R=whesse@google.com
BUG=

Review URL: https://codereview.chromium.org//158773002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32499 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-10 13:43:28 +00:00
ajohnsen@google.com 2f60129fb0 Document ProcessSignal::watch.
We now also allow watching for SIGTERM.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//149253013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32416 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-07 09:41:38 +00:00
sgjesse@google.com 06a79acbf6 Remove wrong type in file_system_entity
R=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//145643010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32354 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-06 12:50:49 +00:00
ajohnsen@google.com d60fd843cd Go into UPGRADED state in http-parser, when socket is being detached.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//148323009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32353 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-06 12:28:51 +00:00
sgjesse@google.com 4521b54617 Change FileStat static methods to return NOT_FOUND instead for throwing
R=ajohnsen@google.com
BUG=http://dartbug.com/16558

Review URL: https://codereview.chromium.org//156633002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32352 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-06 11:27:42 +00:00
ajohnsen@google.com b39955232b Skip bad cookies in http headers.
BUG=https://code.google.com/p/dart/issues/detail?id=16540
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//151123003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32313 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-05 08:31:41 +00:00
ajohnsen@google.com 5e7886f1b7 Short-cut the call to Timer.run, to not go through standalone.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//150563005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32310 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-05 07:44:08 +00:00
ajohnsen@google.com fd18e472e6 Optmize detached socket to not contain a extra stream controller/subscription, but simly forward callbacks (and inject potential extra data).
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//141553014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32277 260f80e4-7a28-3924-810f-c04153c831b5
2014-02-04 10:27:43 +00:00
jacobr@google.com 9cd9140167 Fix websocket_impl.dart to work with websockets created by Chrome devtools.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//141293008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32184 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-30 23:49:46 +00:00
ajohnsen@google.com 75fd2aeb5c Use a list of Uint8List-views instead of a BytesBuilder, to build up websocket messages.
This avoids a lot of copyings, and in the case of only one payload,
there are no copies at all.

BUG=
R=kasperl@google.com

Review URL: https://codereview.chromium.org//130913010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32122 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-29 14:23:44 +00:00
ajohnsen@google.com 753076001e Use Int32x4List to optimize mask/unmask websockets.
BUG=
R=kasperl@google.com

Review URL: https://codereview.chromium.org//137833011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32114 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-29 10:23:25 +00:00
ajohnsen@google.com b99f70a2a9 Speed up web-socket impl by ensuring the optimized compiler is triggered.
Also cleaned up some fields and made the mask-code slightly better.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//148343002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32055 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-28 08:58:54 +00:00
kevmoo@google.com d23e0f6899 HttpSession: better toString()
R=ajohnsen@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//137953005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@32044 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-28 00:09:13 +00:00
kevmoo@google.com 7ebebc7d74 use proper notation for true, false, and null in doc comments
BUG= https://code.google.com/p/dart/issues/detail?id=16193
R=lrn@google.com

Review URL: https://codereview.chromium.org//140783013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31947 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-19 19:24:06 +00:00
kevmoo@google.com c6ea563950 process docs: fixed grammar
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//140693003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31943 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-18 00:54:20 +00:00
lrn@google.com 3b3e87cabc Revert "Rename internal library dart:_collection-dev to dart:_internal."
Dartium needs updating too.

Committed: https://code.google.com/p/dart/source/detail?r=31827

R=floitsch@google.com

Review URL: https://codereview.chromium.org//133273011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31877 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 12:06:38 +00:00
ajohnsen@google.com d676782c06 Fix docs for Process::kill.
BUG=https://code.google.com/p/dart/issues/detail?id=16116
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//140673002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31870 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-16 09:13:34 +00:00
lrn@google.com ead87f47e9 Revert "Rename internal library dart:_collection-dev to dart:_internal."
Dartium needs updating too.

Review URL: https://codereview.chromium.org//133273011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31827 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 12:27:44 +00:00
lrn@google.com 0098710559 Rename internal library dart:_collection-dev to dart:_internal.
BUG= http://dartbug.com/14140
R=floitsch@google.com

Review URL: https://codereview.chromium.org//133893007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31823 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-15 09:24:46 +00:00
sgjesse@google.com 2b8da1ade8 Add documentation to the FileSystemException class
Also update toString slightly.

R=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//131583004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31692 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-10 12:30:29 +00:00
ajohnsen@google.com fd72f5bfbe Fix FileSystemEntity:stat to remove trailing slashes, on Windows.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//131583003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31655 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-09 14:04:00 +00:00
ajohnsen@google.com 754c1d2b2a Fix listing of '' and '/'.
BUG=https://code.google.com/p/dart/issues/detail?id=15966
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//131373002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31652 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-09 10:33:56 +00:00
ajohnsen@google.com b6b8ce1e83 Add HttpRequest::requestedUri.
This makes it easier for the user to generate redirect-urls.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//125743002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31645 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-09 06:42:52 +00:00
srdjan@google.com b7d93c342a Fix 15721: When checking for bad overrides we must eagerly finalize superclasses.
R=regis@google.com

Review URL: https://codereview.chromium.org//128263005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31628 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-08 21:45:05 +00:00
lrn@google.com b0a8e3527a Fix static warnings introduced by library cleanup.
Changing a void function body from  "{ foo(); }" to "=> foo()"
is not safe. The return value of foo may be incompatible with void.

A temporary variable can also be a necessary cast.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//128203002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31606 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-08 12:58:42 +00:00
lrn@google.com a6d4c0b996 Code cleanup (mostly io lib and some http lib).
- Unused function removed,
- Make properties always appear before methods,
- Use dart idioms where possible.

BUG=
R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//124753002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31602 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-08 12:03:11 +00:00
ajohnsen@google.com f7de93ae28 Fix HttpResponse::writeCharCode.
We now always ensure the encoding when writing to the IOSink.

BUG=https://code.google.com/p/dart/issues/detail?id=15905
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//120163006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31531 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-07 07:42:28 +00:00
sgjesse@google.com a89aa53071 Make the Platform.environment return value an unmodifiable map
R=ajohnsen@google.com, kustemann@google.com
BUG=http://dartbug.com/15872

Review URL: https://codereview.chromium.org//123263003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31468 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-06 10:18:22 +00:00
mcampione@google.com cc29ce7e84 Adding library level docs for async, io, convert and fixing a bug in dart:core
BUG=
R=lrn@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//111463004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31421 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-02 18:29:21 +00:00
ajohnsen@google.com 38d0fad2c7 Signal handling, take 2.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//119093007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31276 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 15:07:48 +00:00
ajohnsen@google.com f24f568571 Revert "Signal handling."
This reverts commit r31270.

BUG=

Review URL: https://codereview.chromium.org//105083009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31275 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 14:03:15 +00:00
ajohnsen@google.com e8d9794c70 Signal handling.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//108003009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31270 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 13:08:26 +00:00
ajohnsen@google.com ce2b8a0d21 Work around a VM crash, with Stdout.
BUG=

Review URL: https://codereview.chromium.org//106513005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31258 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 11:53:25 +00:00
ajohnsen@google.com 5e564f370d Add getter for hasTerminal, terminalColumns and terminalLines on stdin.
BUG=https://code.google.com/p/dart/issues/detail?id=15557
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//102123010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31255 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-19 10:59:58 +00:00
sgjesse@google.com 4ca4f0db07 Only store the address bytes for an internet address in Dart
We used to store the full C "struct sockaddr_storage" in the Dart
internet address. Changed this to be only the bytes for the
address. This removes opaque platform specific binary data from Dart
(e.g. on Mac OS the "struct sockaddr" has an initial length byte).

R=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//113923004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31191 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-17 15:35:11 +00:00
ajohnsen@google.com 7d4e2f9ac8 Alternative Timer implementation using simply list-based priority heap.
The current implementation is not memory-optimized yet, to make it
easier to review.

BUG=
R=fschneider@google.com, lrn@google.com, sgjesse@google.com

Committed: https://code.google.com/p/dart/source/detail?r=31132

Review URL: https://codereview.chromium.org//99203010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31158 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-16 12:56:37 +00:00
ajohnsen@google.com d45b9e9a21 Revert "Alternative Timer implementation using simply list-based priority heap."
This reverts commit r31132.

BUG=

Review URL: https://codereview.chromium.org//115223002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31133 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-13 14:13:07 +00:00
ajohnsen@google.com a828bebc01 Alternative Timer implementation using simply list-based priority heap.
The current implementation is not memory-optimized yet, to make it
easier to review.

BUG=
R=lrn@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//99203010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31132 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-13 13:48:04 +00:00
ajohnsen@google.com fe6b63d5e4 Add File.copy(Sync) to dart:io.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//105133004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31125 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-13 12:04:24 +00:00
ajohnsen@google.com c88afd2ca4 Add getter for lineMode and echoMode for Stdin.
BUG=https://code.google.com/p/dart/issues/detail?id=15424
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//102953008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31103 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-12 16:42:26 +00:00
sgjesse@google.com 7b70c2c267 Add UDP support to dart:io
Initial implementation of UDP support in dart:io

Added a RawDatagramSocket which gets the same events as a RawSocket
except that READ_CLOSED is never received.

The receive from a RawDatagramSocket returns a Datagram object where
the senders address and port is presten together with the data.

The send on a RawDatagramSocket takes data and the address and port of
the destination.

Extended the number of socket options to support UDP.

Added getting the socket options.

R=ajohnsen@google.com
BUG=http://dartbug.com/1975

Review URL: https://codereview.chromium.org//85993002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31098 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-12 15:45:25 +00:00
ajohnsen@google.com 3308fc7600 Ignore HandshakeExceptions in HttpServer, as they are request(socket)-bound and not fatal for the server.
BUG=https://code.google.com/p/dart/issues/detail?id=15419
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//108323003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31095 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-12 14:21:40 +00:00
lrn@google.com 70f6617532 Revert "Fix VM timer firing too early."
Committed: https://code.google.com/p/dart/source/detail?r=30987

R=floitsch@google.com

Review URL: https://codereview.chromium.org//101293006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31009 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 08:40:56 +00:00
sgjesse@google.com 86f333fd7e Fix ByteBuffer documentation
R=ajohnsen@google.com
BUG=http://dartbug.com/15518

Review URL: https://codereview.chromium.org//102733005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30990 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-09 15:24:32 +00:00
lrn@google.com dd6ee012d1 Revert "Fix VM timer firing too early."
Review URL: https://codereview.chromium.org//101293006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30987 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-09 13:43:52 +00:00
lrn@google.com 2aa9f026f2 Change Future.timeout callback to a named parameter.
R=floitsch@google.com

Committed: https://code.google.com/p/dart/source/detail?r=30790

Review URL: https://codereview.chromium.org//96643003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30985 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-09 12:06:12 +00:00
ajohnsen@google.com a511ea963a If a new timer is the last timer to time out, don't run through the entire list of timers.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//106103007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30976 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-09 08:00:12 +00:00
ajohnsen@google.com 2cb09b76eb Only notify event-handler when there is an earlier timer in the timer queue.
This fixed a performance issue made visible by r30797.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//98233005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30866 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-04 20:12:09 +00:00
ajohnsen@google.com abdc2ade9d Rewrite file-system-watcher to better handle the different system APIs.
BUG=http://code.google.com/p/dart/issues/detail?id=14941
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//98773002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30848 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-04 10:35:00 +00:00
sgjesse@google.com 86b9be1267 Fully rename argument
TBR=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//96893002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30783 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-29 12:52:39 +00:00
sgjesse@google.com b29e2d8644 Improve the documentation for exit codes in Process
R=ahe@google.com, ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//94573002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30778 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-29 11:20:19 +00:00
sgjesse@google.com 5ec3f666c0 Add the index information to network interface
R=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//95183002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30776 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-29 11:18:30 +00:00
ajohnsen@google.com e60f22cb9e Add support for Websocket protocols.
This also fixes an issue where idle sockets could keep the program
alive.

BUG=https://code.google.com/p/dart/issues/detail?id=14503
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//91223002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30712 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 12:10:23 +00:00
ajohnsen@google.com 79cf8dc61f Don't report file-system move events on Mac OS, and use no-defer to avoid past events.
Mac OS does not have a proper way to report 'from' and 'to', thus making it impossible to reason the move direction, as other events may shuffle the order, events are received in.

BUG=https://code.google.com/p/dart/issues/detail?id=14806,https://code.google.com/p/dart/issues/detail?id=14793,https://code.google.com/p/dart/issues/detail?id=14849
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//88063002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30710 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-27 11:48:14 +00:00
johnniwinther@google.com 8541952510 Implement least upper bound.
As a side-effect disallow multiple inheritance with different type arguments.

R=karlklose@google.com

Review URL: https://codereview.chromium.org//52263003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30661 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-26 08:32:08 +00:00
sgjesse@google.com e9c480c208 Fix bug in handling IPv6 proxy hosts
TBR=ajohnsen@google.com

Review URL: https://codereview.chromium.org//81083002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30523 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 15:21:53 +00:00
ajohnsen@google.com 6279004a17 Avoid unneeded toLowerCase and add fast version of _isTokenChar, in HTTP parser.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//80883002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30517 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 13:21:30 +00:00
sgjesse@google.com 13a2617005 Better handling of IPv6 with HTTP proxy
Handle IPv6 numeric hosts in the proxy configuration.

Update the environment variable based proxy server cofiguration
to also handle that the host is an IPv6 numeric address enclosed in
[]'s. Also support IPv6 numeric addresses in []'s in the no_proxy
environment variable.

Also fixed the issue where an empty string value for the
environment variables http_proxy and friends caused the proxy
configuration to become ':1080'.

R=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//80673002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30512 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-21 12:05:20 +00:00
sgjesse@google.com 0f61205338 Documentation update
Fix worngly indended sample code.

Add a few samples.

R=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//77893003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30474 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 15:40:17 +00:00
sgjesse@google.com 5f8d021f0d Change InternetAddress back to abstract and make the constructor a factory
This should make the InternetAddress a valid class again.

TBR=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//77023004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30467 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 13:23:58 +00:00
sgjesse@google.com 93d6f94c11 Remove abstract from InternetAddress now that it has a constructor
TBR=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//77913006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30462 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 12:35:01 +00:00
ajohnsen@google.com a7db0f12c0 Simplify 0-timers to not go through the eventhandler.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//78103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30461 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 12:33:05 +00:00
ajohnsen@google.com 3aecb9e8ff Fix http headers to enable chunked transfer encoding when content-length is set to -1.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//77353005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30460 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 12:28:37 +00:00
sgjesse@google.com 26f89dbd7f Fix dart2js after InternetAddress change
R=ajohnsen@google.com, ngeoffray@google.com
BUG=

Review URL: https://codereview.chromium.org//78223002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30459 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 12:03:14 +00:00
ajohnsen@google.com d4345e60f2 Use 'eagerError' on Future:wait in HTTP, after Futute:wait change.
BUG=

Review URL: https://codereview.chromium.org//78083002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30451 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 10:22:37 +00:00
sgjesse@google.com 32e6279482 Update InternetAddress
Add InternetAddress constructor for numeric addresses. An
InternetAddress can now be constructed without using DNS resolving.

Add hash code calculated from the bytes of the address.

Add equality operator comparing the bytes of the address.

Added check for multicast addresses.

R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//76383002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30449 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 10:01:22 +00:00
ajohnsen@google.com e03a7418ae Clean up HttpHeaders to always have them in a consistent state.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//72663005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30445 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-20 09:38:14 +00:00
sgjesse@google.com 09ef9104e0 Don't supply host names for the fixed internet addresses
The hard-coded host names "localhost" and "localhost-ip6" where taken
from the default Ubuntu hosts file. But other machines (e.g the
default on Mac OS) might be configured different. To avoid actual
lookup of "localhost" and "localhost-ip6" returning a different
address than the provided fixed loopback addresses don't add an actual
host name.

R=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//76243002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30403 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-19 12:17:41 +00:00
ajohnsen@google.com 6d1c4910a9 Don't use linked maps/sets in http internals.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//75033003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30343 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-18 12:44:14 +00:00
ajohnsen@google.com f27bfcd719 Don't create lower-case copies of already lower-case header names, in http parser.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//59703010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30341 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-18 12:41:31 +00:00
ajohnsen@google.com f6a50d8894 Use typed-data views for incoming http data.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//59673006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30340 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-18 12:40:38 +00:00
ajohnsen@google.com 491442573f Use a re-usable buffer for writing HTTP headers. This includes a new header limit of 8192 bytes.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//65043019

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30335 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-18 10:27:50 +00:00
sgjesse@google.com 4d148bb1fd Improve the HTTP client error when the provided URI is not suitable
This will provide a better error message for e.g. unquoted IPv6
literal addresses (http://::1:8888/)

R=whesse@google.com
BUG=

Review URL: https://codereview.chromium.org//66603002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30151 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-11 11:27:50 +00:00
amouravski@google.com 711048c673 Fill in more documentation blanks in dart:io.
R=floitsch@google.com

Review URL: https://codereview.chromium.org//65843003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30115 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-08 15:51:12 +00:00
amouravski@google.com fd39ed7e89 Updated docs for FileMode.
R=floitsch@google.com

Review URL: https://codereview.chromium.org//65843002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30086 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-08 00:09:45 +00:00
kevmoo@j832.com 79cca83ff9 Types for top-level constants in convert and io
R=floitsch@google.com

Review URL: https://codereview.chromium.org//60513011

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29991 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 19:38:43 +00:00
ajohnsen@google.com 6426cf11ab Avoid throwing internal null-pointer exceptions in http parser.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//61753003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29969 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 12:36:22 +00:00
ajohnsen@google.com 57d8b90fe1 Rename remoteHost to remoteAddress on *Socket.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//59213003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29904 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 13:24:49 +00:00
sgjesse@google.com 606aaaf82f Add fromUri constructor to File, Directory and Link
R=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//57943002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29881 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 09:28:08 +00:00
sgjesse@google.com 0aa1345b12 Add optional flush argument to some file methods
BUG=http://dartbug.com/8794

R=whesse@google.com, ajohnsen@google.com

Review URL: https://codereview.chromium.org//20745006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29880 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-05 08:46:50 +00:00
whesse@google.com 3787f6d00e Return an absolute URI for Platform.script.
BUG=
R=ajohnsen@google.com, sgjesse@google.com

Committed: https://code.google.com/p/dart/source/detail?r=29740

Reverted: https://code.google.com/p/dart/source/detail?r=29742

Review URL: https://codereview.chromium.org//46163009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29792 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-04 07:25:57 +00:00
whesse@google.com 71744686cf Revert "Return an absolute URI for Platform.script."
This reverts change r29740.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//55583004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29742 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-01 10:52:47 +00:00
whesse@google.com b48895be05 Return an absolute URI for Platform.script.
BUG=
R=ajohnsen@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//46163009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29740 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-01 10:37:36 +00:00
sgjesse@google.com c38de04d0c Change dart:io Platform.script to return a Uri.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//46063010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29651 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 07:29:01 +00:00
whesse@google.com 4f08151090 Revert "Change dart:io Platform.script to return a Uri."
This reverts r29619 and r29624.  The changes look fine on the buildbot,
but need review before adding to the repository.

BUG=

TBR=sgjesse@google.com

Review URL: https://codereview.chromium.org//52723007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29627 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 02:17:37 +00:00
whesse@google.com cb0110350a Change dart:io Platform.script to return a URI. Change all uses of Platform.script to work with the new value.
R=floitsch@google.com

Review URL: https://codereview.chromium.org//53313007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29619 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-31 01:08:11 +00:00
whesse@google.com 462d0363fe Remove dart:io Options class.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//52903002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29570 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 17:46:30 +00:00
whesse@google.com 1e3b58ade0 dart:io | Add 'recursive' flag to File.create and Link.create.
BUG=dartbug.com/12462
R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//52363002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29563 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 16:31:53 +00:00
whesse@google.com 16eb7fd728 Fix standalone/io/platform_test on Windows. Remove @deprecated from Platform.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//51103012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29558 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 15:57:24 +00:00
ajohnsen@google.com 841785cbb3 Add IOSink:flush().
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//52263005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29550 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 14:50:22 +00:00
ajohnsen@google.com 253ad80d88 Don't close the _FileStream until all operations are done.
BUG=

Review URL: https://codereview.chromium.org//48113028

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29541 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 13:15:32 +00:00
ajohnsen@google.com 7338c0c409 Fix File.openStream where it sometimes would keep the file open.
BUG=

Review URL: https://codereview.chromium.org//46073003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29539 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 12:38:00 +00:00
lrn@google.com f0a1c922a2 Reapply "Remove @deprecated features."
R=scheglov@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//50413005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29535 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 12:09:15 +00:00
ajohnsen@google.com 09e82e02be Let the stream of File:openRead handle cancel correctly.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//51883004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29534 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 11:44:06 +00:00
ajohnsen@google.com c3a9f33ef8 Fix directory-listing to return a future on cancel.
This also fixes an issue where we would leake FDs/HANDLEs if the listing was interrupted.

Add new pause-resume-cancel test of directory listing.

BUG=https://code.google.com/p/dart/issues/detail?id=10163
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//45833003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29454 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 15:04:59 +00:00
ajohnsen@google.com bf7ea13e8e Fix HttpServer after SecureServerSocket no longer is a ServerSocket.
BUG=

Review URL: https://codereview.chromium.org//50783003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29451 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 14:38:11 +00:00
ajohnsen@google.com fe4797646c Fix sdk/lib/io errors found by the analyzer.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//46663003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29450 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 14:30:36 +00:00
sgjesse@google.com 426bf24751 Remove type argument from SecureServerSocket
The VM will soon disallow this construct.

R=johnniwinther@google.com, whesse@google.com
BUG=

Review URL: https://codereview.chromium.org//50143006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29448 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 14:18:16 +00:00
lrn@google.com 57efa5da8c Revert "Remove @deprecated features."
There were more uses of the deprecated features.

Review URL: https://codereview.chromium.org//50313004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29443 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 12:54:37 +00:00
lrn@google.com 72e1d263dc Remove @deprecated features.
R=alanknight@google.com, rnystrom@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//48293002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29438 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 12:00:44 +00:00
whesse@google.com 3b54950144 Remove dart:platform library.
This reverts commits r29154, r29244, r29251, r29268, and r29272.
The dart:io Platform class will not be moved to a dart:platform library.

R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//50573002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29435 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 11:33:34 +00:00
ajohnsen@google.com 2101ba9c12 Add 'isDir' to FileSystemEvent.
BUG=https://code.google.com/p/dart/issues/detail?id=14425
R=whesse@google.com

Review URL: https://codereview.chromium.org//48613002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29371 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 17:14:43 +00:00
sgjesse@google.com a405eff618 Add a note on watching files on Linux.
BUG=http://dartbug.com/13562
R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//48593002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29355 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 12:08:41 +00:00
sgjesse@google.com 2c386273cf Throw exception when trying to modify HTTP status code when header is already sent
BUG=http://dartbug.com/14505
R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//48283002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29346 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 09:26:02 +00:00
whesse@google.com d20c5a3f4c Deprecate dart:io Platform, replaced by dart:platform.
BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org//45103002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29272 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 19:30:56 +00:00
floitsch@google.com 6a72655d1b Very simple version of Isolates.
R=ajohnsen@google.com, iposva@google.com, kasperl@google.com, lrn@google.com

Review URL: https://codereview.chromium.org//27215002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29271 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 19:23:00 +00:00
whesse@google.com 2e949d99d6 dart:io | Directory.createTemp - fix missed rename of template to prefix.
BUG=dartbug.com/14409
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//43433002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29234 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-25 07:38:28 +00:00
ajohnsen@google.com 1cfe5c7f64 Document FileSystemEntity:watch and family..
BUG=https://code.google.com/p/dart/issues/detail?id=14369
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//38783005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29171 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 12:31:39 +00:00
ajohnsen@google.com e02b5a3fa4 Make FileSystemEntity.watch return a broadcast stream.
BUG=https://code.google.com/p/dart/issues/detail?id=14378
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//39943002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29170 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 12:30:20 +00:00
ajohnsen@google.com 103eac574c Remove FileException, DirectoryException and LinkException from dart:io and use FileSystemException instaed.
BUG=https://code.google.com/p/dart/issues/detail?id=12461
R=nweiz@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//26968003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29168 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 12:17:20 +00:00
ajohnsen@google.com fdea26c768 Close file watcher when target is deleted.
BUG=http://code.google.com/p/dart/issues/detail?id=14374
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//39613002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29159 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 08:12:16 +00:00
ager@google.com 208042db5f Fix typos in FileSystemEntity.watch documentation.
R=ajohnsen@google.com
BUG=

Review URL: https://codereview.chromium.org//39313003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29157 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-24 07:23:51 +00:00
ajohnsen@google.com 9c7ba71d61 Don't close existing connection on HttpServer close (and stream cancel).
This also fixes several issues exposed by this.

BUG=http://code.google.com/p/dart/issues/detail?id=14317
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//36643002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29083 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 14:18:25 +00:00
whesse@google.com 6dbc9e5268 dart:io | Remove uses of Options class from standalone tests. Mark Options deprecated.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//37033002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29079 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-23 12:50:18 +00:00
whesse@google.com a87372af70 dart:io | Remove deprecated _Path library, and use FileSystemEntity.parent for recursive Directory.create.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//25421003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28992 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 10:30:45 +00:00
whesse@google.com bfc3d53dc6 dart:io | Add FileSystemEntity.parent, make File.directory call it.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//26001002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28986 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 07:32:06 +00:00
whesse@google.com 1475ab75e9 dart:io | Remove deprecated behavior of Directory('').createTemp, replaced by Directory.systemTemp.
BUG=dartbug.com/13720
R=floitsch@google.com

Review URL: https://codereview.chromium.org//28943003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28920 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 08:23:30 +00:00
floitsch@google.com dc9c5f42ed Redo StreamTransformers so they work with Stack traces.
Since this involved a breaking change I cleaned up more of the
StreamTransformer API.

This CL also deprecates the getAttachedStackTrace method.

R=ajohnsen@google.com, lrn@google.com, nweiz@google.com, rnystrom@google.com

Review URL: https://codereview.chromium.org//25354003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28562 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-12 12:34:34 +00:00
ajohnsen@google.com b95a02f0b5 Remove debug print from previous commit.
BUG=

Review URL: https://codereview.chromium.org//27000007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28516 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 14:05:16 +00:00
ajohnsen@google.com 86e664e645 Preserve '\' in filenames for uploads, as Windows/IE contains them.
BUG=http://code.google.com/p/dart/issues/detail?id=13928
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//26973004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28515 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 12:36:14 +00:00
floitsch@google.com 4be547c705 Adapt streams for additional stackTrace argument.
R=lrn@google.com

Review URL: https://codereview.chromium.org//25094002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28511 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 12:02:20 +00:00
floitsch@google.com e73ce83a12 Rename error to _reportError in HttpParser.
The "error" name made it harder for dart2js since it assumed that errors
could get called and that the error method would be closurized.

R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//26575004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28508 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-11 11:38:19 +00:00
whesse@google.com a77536b83a Fix type error in http_impl.dart.
BUG=

Review URL: https://codereview.chromium.org//25757009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28264 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-04 13:01:48 +00:00
whesse@google.com e98871bbc6 dart:io | Replace duplicate implementation with Uri.resolveUri in HttpClient.
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//25426007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28261 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-04 11:21:23 +00:00
whesse@google.com 3c0c99a3b9 Add Directory.systemTemp getter to replace createSystemTemp().
BUG=dartbug.com/12496
R=rnystrom@google.com, sgjesse@google.com

Review URL: https://codereview.chromium.org//25720002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28215 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 12:55:30 +00:00
floitsch@google.com c65685a666 Remove dead code.
_StdinEventSink doesn't look like it's still used.

R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//25748002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28174 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-02 17:29:55 +00:00
whesse@google.com e5982dc4c9 Fix breakage from r28097
BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//25553002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28100 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 16:07:28 +00:00
whesse@google.com b221c702a3 dart:io | Add Directory.CreateSystemTemp(template) and change Directory.CreateTemp(template).
BUG=dartbug.com/12496
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//25279003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28097 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 15:38:01 +00:00
ajohnsen@google.com b90ecc03cd Don't throw SocketExceptions in websocket.
This makes the implementation much more stable and act just like
HttpResponse.

BUG=https://code.google.com/p/dart/issues/detail?id=13164
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//25373004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28089 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 11:26:43 +00:00
ajohnsen@google.com 8323221e70 Only allow one async operation on RandomAccessFile at a time.
This is to make sure we never have a race-condition on the same
File*/FD. For a File it should be fine, as each operation will open it's
own FD to work on.

BUG=
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//24721003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28088 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-01 11:23:32 +00:00
whesse@google.com 5b95688b5f dart:io | Remove unused asynchronous file request enums.
BUG=
R=ajohnsen@google.com

Review URL: https://codereview.chromium.org//25173004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28056 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-30 15:23:38 +00:00
whesse@google.com 12cadfd1be Add .address to [Raw]ServerSocket and HttpServer.
Also use .address in Pub's barback server.

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//25010004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28010 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-27 13:36:03 +00:00
ajohnsen@google.com 7e75589a5d Fix File stream on cancel.
Before we could end up having both an issued read and a close request.
Given the new nature of our io-service, this could lead to a race
condition between the two.

BUG=https://code.google.com/p/dart/issues/detail?id=12982
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//24667003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27955 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-26 14:34:15 +00:00