iposva@google.com
8609239930
- Move VM specific helpers to the common dart:io patch file.
...
Review URL: https://codereview.chromium.org//812673009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42675 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 23:02:06 +00:00
iposva@google.com
2104fd6165
Fix http://dartbug.com/21834
...
- Ensure that microtasks fire after every timer event, instead
of being bunched together once all pending timers fired.
- Do not wait for timer message to be delivered. Trigger timers
as soon as they are ready from within the message handling
loop.
- Notify timers in the order of wakeup time regardless of
specified timeout value. (AKA Do not allow Timer.run to
overtake new Timer() scheduled operations.)
R=zra@google.com
Review URL: https://codereview.chromium.org//825403003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42673 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-07 22:21:59 +00:00
lrn@google.com
8524d656af
Omit variables beginning with "=" from Windows environment.
...
BUG= http://dartbug.com/21961
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//831213002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42591 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 13:08:42 +00:00
sgjesse@google.com
a773a54ed2
Ignore all environment variables with name starting with '='
...
This will remove the Windows specific environment variables starting
with '=' from the environment. This also ignores the case where the
environment variable name is empty, which have been seen on Mac OS (reported
in the referenced bug).
BUG=http://dartbug.com/21961
R=lrn@google.com
Review URL: https://codereview.chromium.org//835863004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42589 260f80e4-7a28-3924-810f-c04153c831b5
2015-01-05 12:37:42 +00:00
sigmund@google.com
82484c8301
Delete dartiverse-search from the repo and update dart:io documentation to point
...
to the new location.
The code now lives in: https://github.com/dart-lang/sample-dartiverse-search
The code is tested in the package bots at:
http://build.chromium.org/p/client.dart.packages/console
In particular, these 3 columns:
http://build.chromium.org/p/client.dart.packages/console?builder=packages-windows-sample-sample-dartiverse-search&builder=packages-linux-sample-sample-dartiverse-search&builder=packages-mac-sample-sample-dartiverse-search&reload=none
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//752303004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@42144 260f80e4-7a28-3924-810f-c04153c831b5
2014-12-05 20:15:02 +00:00
sgjesse@google.com
4740a77b0e
Handle IPv6 addresses for HTTP client requests
...
The Host header was not set correctly for HTTP requests when an IPv6 address
was used. The square brackets surrounding the address was missing.
BUG=http://dartbug.com/21698
R=lrn@google.com
Review URL: https://codereview.chromium.org//755883007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41980 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-26 07:30:26 +00:00
lrn@google.com
6ae29ec58e
Create generic check methods for RangeError causing checks.
...
Use them where appropriate in core libraries.
There are many more possible uses in vm- and dart2js-libraries.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//745573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41893 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-21 10:29:15 +00:00
sgjesse@google.com
b6d8a272a5
Make the ConsoleSink call methos argument optional.
...
R=iposva@google.com
BUG=
Review URL: https://codereview.chromium.org//739153002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41842 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-20 07:51:33 +00:00
sgjesse@google.com
6d0e1d79c5
Add console to dart:io for synchronus writing to stdout and stderr
...
This is provided as a fallback for applications relying synchronus
writing to stdout/stderr, which was changed to be async in r41436.
R=iposva@google.com
BUG=
Review URL: https://codereview.chromium.org//733463002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41801 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-18 14:07:59 +00:00
kustermann@google.com
403e0c33cd
Add selectedProtocol() to abstract _SecureFilter class
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//710973003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41630 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 13:20:56 +00:00
kustermann@google.com
53cc8c512d
Support for the ALPN extension of the TLS protocol for Client and Server
...
This CL uses the NSS support for the ALPN extension of the TLS protocol
(see RFC 7301).
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//625953002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41628 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-10 12:31:02 +00:00
sgjesse@google.com
7770efc4a9
Update documentation for RandomAccessFile
...
R=kustermann@google.com , lrn@google.com
BUG=http://dartbug.com/21516
Review URL: https://codereview.chromium.org//702363002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41548 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-06 12:05:19 +00:00
ajohnsen@google.com
8240d9a4cf
Only lower-case ContentType's values if the name is 'charset'.
...
BUG=https://code.google.com/p/dart/issues/detail?id=21385
R=lrn@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//694293002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41456 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-03 12:34:08 +00:00
sgjesse@google.com
65e1149f8c
Make stdout/stderr async
...
This makes stdout.write and stderr.write async.
This effectively reverts https://code.google.com/p/dart/source/detail?r=33645
Reapplies r41350 after the dart2js batch-runner have been changed to handle
async stdout/stderr.
R=ricow@google.com
BUG=
Review URL: https://codereview.chromium.org//693793002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41436 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-31 12:11:53 +00:00
sgjesse@google.com
b6d16215aa
Revert "Make stdout/stderr async"
...
This reverts r41350.
There are test-failures that needs to be analyzed.
TBR=iposva@google.com , ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//686703002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41353 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 09:07:56 +00:00
sgjesse@google.com
c50df5e563
Make stdout/stderr async
...
This makes stdout.write and stderr.write async.
This effectively reverts https://code.google.com/p/dart/source/detail?r=33645
R=iposva@google.com , ajohnsen@google.com
BUG=
Review URL: https://codereview.chromium.org//673193002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41350 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-28 08:53:10 +00:00
iposva@google.com
bf6f6de97b
- String array should be const.
...
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//641983002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41003 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-09 05:58:36 +00:00
sgjesse@google.com
50c17cd3c4
Fix SecureServerSocket documentation
...
R=whesse@google.com
BUG=http://dartbug.com/21175
Review URL: https://codereview.chromium.org//622503003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40830 260f80e4-7a28-3924-810f-c04153c831b5
2014-10-01 08:10:03 +00:00
kustermann@google.com
e6e8fd93fc
Fix circular ringbuffer used in socket implementation
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//615923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40811 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-30 13:19:36 +00:00
ajohnsen@google.com
bffaae9a37
Update watch docs.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//589373002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40589 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-23 11:35:31 +00:00
ajohnsen@google.com
35fb108468
Add HttpServer:autoCompress option, to disable auto gzip compression.
...
BUG=
R=lrn@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//598453003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@40587 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-23 11:08:24 +00:00
ajohnsen@google.com
f75e71d95c
Remove unused string interpolations.
...
BUG=
R=lrn@google.com
Review URL: https://codereview.chromium.org//532233002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39802 260f80e4-7a28-3924-810f-c04153c831b5
2014-09-03 12:35:50 +00:00
kustermann@google.com
1ce303fa80
Bugfix in dart:io's WebSocketTransformer implementation, correctly test async behaviour of websocket, some test cleanup
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//517513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39641 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-28 10:44:46 +00:00
sgjesse@google.com
064fe27add
Fix HttpServer documentation
...
The list of default headers was not rendered verbatim (https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart-io.HttpServer#id_defaultResponseHeaders ).
R=ricow@google.com
BUG=
Review URL: https://codereview.chromium.org//513973003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39639 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-28 09:59:19 +00:00
kustermann@google.com
705b05c93d
Fix idle connection pool issue in dart:io's HttpClient
...
So far if all connections in the connection pool of an http client were idle,
the idle connections were closed after 100ms. This goes obviously against the
idea of having a connection pool to avoid repeated reconnects. If a client makes
a request, does some work for 110 ms and makes another request, the idle
connection would be gone and it would reconnect.
When a user is done with an HttpClient and called close() on it the HTTP client
would in certain cases still sit around for another 100ms before closing all
connections. For command line applications this might delay the time when the VM
exists.
This 100ms idle connection pool timeout was hard-coded and not changeable. There
is still a idle timeout on a connection basis, defaulting to 15 seconds.
This CL removes the mentioned 100ms timer and has 2 consequences:
a) A connection stays in the pool for 15 seconds by default.
b) The idle connections will be closed immediately if HttpClient.close() was
called.
Users who relied on the behaviour of a VM shutdown after 100ms without calling
HttpClient.close() are broken and must be fixed.
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//486853005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39542 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-26 09:46:38 +00:00
sgjesse@google.com
ac911ff0bf
Make the default HTTP server configuration more secure
...
Add a mechanism for setting default headers to add to all responses.
By default each the HTTP response now will contain the following headers:
Content-Type: text/plain; charset=utf-8
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
New cookies created are now 'httpOnly' by default.
BUG=http://dartbug.com/19676
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//443373003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39118 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 07:12:03 +00:00
sgjesse@google.com
a2875d1768
Fix bug in caching of chunked transfer encoding in HTTP headers
...
R=ajohnsen@google.com
BUG=http://dartbug.com/20335
Review URL: https://codereview.chromium.org//460653002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@39116 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-12 06:39:12 +00:00
ajohnsen@google.com
7ea3f05253
Clean up socket:connect change.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//441903003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38918 260f80e4-7a28-3924-810f-c04153c831b5
2014-08-06 05:10:44 +00:00
ajohnsen@google.com
0e33676cf2
Don't resolve 'package:*' and 'dart:*' Uris, in Platform:script.
...
BUG=
R=kustermann@google.com
Review URL: https://codereview.chromium.org//426643002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38622 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-28 14:04:20 +00:00
ajohnsen@google.com
f560436366
Fix two other issues, with my previous commit.
...
BUG=
Review URL: https://codereview.chromium.org//425733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38619 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-28 13:12:22 +00:00
ajohnsen@google.com
d56b11bf59
Compute absolute script path at isolate startup.
...
BUG=https://code.google.com/p/dart/issues/detail?id=20119
R=whesse@google.com
Review URL: https://codereview.chromium.org//423843002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38616 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-28 12:31:29 +00:00
kevmoo@google.com
3ff56268eb
Fix typo in Socket.connect
...
BUG: https://code.google.com/p/dart/issues/detail?id=20198
R=kevmoo@google.com
Review URL: https://codereview.chromium.org//420683002
Patch from Kenneth Endfinger <kaendfinger@gmail.com>.
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38578 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-25 18:14:51 +00:00
sgjesse@google.com
cef31ae5e0
Improve HTTP error message
...
R=kustermann@google.com
BUG=
Review URL: https://codereview.chromium.org//382773002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38115 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-10 10:53:53 +00:00
sgjesse@google.com
8213dd365b
Add option to HttpClient to turn of auto uncompression
...
R=ajohnsen@google.com
BUG=http://dartbug.com/19769
Review URL: https://codereview.chromium.org//370743003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38012 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-04 12:59:37 +00:00
ajohnsen@google.com
877d4c2138
Validate headers when added to HttpHeaders.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//364313002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38009 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-04 11:04:03 +00:00
asiva@google.com
a2d7a425c9
- Remove Dart_ReceivePortGetId, Dart_GetReceivePort and Dart_PostMessage.
...
- Change _EventHandler._sendData to use a sendport object instead of a
receiveport object.
R=iposva@google.com
Review URL: https://codereview.chromium.org//359673002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37827 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-30 17:46:26 +00:00
ricow@google.com
9e8dcea244
Fix typo in dart:io process documentation
...
BUG: http://dartbug.com/19590
R=ajohnsen@google.com , ricow@google.com
Review URL: https://codereview.chromium.org//349753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37775 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-27 07:06:24 +00:00
whesse@google.com
7c2cc61e30
Fix type error in r37647
...
BUG=
R=herhut@google.com
Review URL: https://codereview.chromium.org//349403003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37654 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-24 11:30:15 +00:00
whesse@google.com
cd2b96afd8
Add _owner setter to RawSecureSocket.
...
BUG=
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//354593002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37647 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-24 09:40:48 +00:00
lrn@google.com
736db44293
New Uri.parse and validation.
...
Ensures that the resulting URI is valid.
Escapes invalid characters except the gen-delim group of delimites, where
escapes are allowed.
R=ajohnsen@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//335373003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37479 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-19 09:05:07 +00:00
lrn@google.com
31eeb6caf2
Revert "New, more validating, parser for URI." and follow-up patches.
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//337033003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37359 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-16 12:32:35 +00:00
lrn@google.com
c7d98e335b
New, more validating, parser for URI.
...
BUG= https://code.google.com/p/dart/issues/detail?id=16081
R=ajohnsen@google.com , fschneider@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//321543003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37346 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-16 07:00:22 +00:00
kevmoo@google.com
8822c6c905
Fixed toString of Platform.environment on Windows
...
BUG= https://code.google.com/p/dart/issues/detail?id=19244
R=lrn@google.com
Review URL: https://codereview.chromium.org//325533002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37192 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-10 18:37:08 +00:00
ajohnsen@google.com
b908de9ec0
Add HttpServerConnection to Observatory.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//302173007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37166 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-10 07:33:37 +00:00
ajohnsen@google.com
4daef42a37
Enable throttleing of HttpClient per host, with default being 6.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//311513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36861 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-02 10:38:02 +00:00
ajohnsen@google.com
e92ee05abc
Fix assertion in http-client.
...
It's okay to have outstanding socket connections, while doing a force
close. They will be cleaned up later (we have no way of breaking a
socket connect).
BUG=
Review URL: https://codereview.chromium.org//309033002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36859 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-02 09:46:59 +00:00
ajohnsen@google.com
e6137e4d1e
When a connection is upgraded, don't return it as idle.
...
Instead we now simply close the socket and return a 'done' stream
subscription, if the user listened to the response. The only way to get
data from a 'upgraded' response, is now by actually doing a detach.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//308923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36858 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-02 08:17:38 +00:00
ajohnsen@google.com
41489d93fa
Make the _ConnectionTarget responsible of doing the Socket connect.
...
This also introduces the concept of a connecting-counter, for the number
of sockets currently performing a new connection.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//304393005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36857 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-02 07:52:09 +00:00
ajohnsen@google.com
8b612e8780
Add read/write stats to Socket and RandomAccessFile.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//298353002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36738 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-28 13:29:51 +00:00
ajohnsen@google.com
9c7979ed1f
Add 'owner' field to sockets, that point to a potential IO resource using that Socket.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//304513004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36680 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 14:10:31 +00:00
ajohnsen@google.com
7a7a63a513
Untype 'Socket' a few places, where we try to call a hidden function.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//300113005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36673 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 13:17:56 +00:00
ajohnsen@google.com
217e8b8605
Add WebSockets to Observatory.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//300043011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36667 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 11:37:51 +00:00
ajohnsen@google.com
7aed60d005
Show actualy FD for files in Observatory.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//296403005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36656 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 09:18:43 +00:00
ajohnsen@google.com
dbb592ed0a
Put delivering of parsed http-requests at the end of the message-queue.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//298143003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36655 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 09:17:57 +00:00
ajohnsen@google.com
6bb3c6e99b
Merge _idleConnections and _activeConnections into one structure, _ConnectionTarget.
...
The connection-target will at some point be in charge of handling
http client throttling.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//280813003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36646 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 06:58:06 +00:00
ajohnsen@google.com
44d8df4bb4
Add Socket ref to HttpServer.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//297213005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36644 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-27 06:38:15 +00:00
johnmccutchan@google.com
19efb28eab
Add initial Random Access File information to Observatory
...
BUG=
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//291343009
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36638 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-26 15:34:31 +00:00
ajohnsen@google.com
968fb8ee31
Add missing files.
...
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//293013008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36420 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-21 11:27:47 +00:00
ajohnsen@google.com
198b11bd9b
Add IO service object handler, with initial implementation for HTTP server.
...
This is tempoary disabling the Socket service handler.
BUG=
R=johnmccutchan@google.com
Review URL: https://codereview.chromium.org//284313011
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36417 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-21 11:12:49 +00:00
ajohnsen@google.com
50a8f03b5a
Fix websocket status-code for when the close-timer or error cases.
...
BUG=
R=ricow@google.com
Review URL: https://codereview.chromium.org//297653003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36346 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-20 07:48:58 +00:00
ajohnsen@google.com
222b5573f9
Make _activeConnections in HttpClient sorted by key.
...
This is the first step towards making HttpClient limited per host.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//280963003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36164 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-14 13:26:41 +00:00
ajohnsen@google.com
5a81413409
Fix Directory, File and Link constructor text.
...
A relative path is interpolated based on current working directory, not
initial working directory.
BUG=https://code.google.com/p/dart/issues/detail?id=17984
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//281723004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36154 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-14 09:37:39 +00:00
kevmoo@google.com
c054ad39c3
http_date: produce leading zero on day component
...
per http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//274243002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@36028 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-12 13:32:23 +00:00
kevmoo@google.com
24f1a368c2
dart:io HttpServer.serverHeader - tweaks to doc comments
...
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//277783002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35981 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-09 16:34:36 +00:00
ajohnsen@google.com
c7a15b7c2b
Add support for cloning server-sockets.
...
BUG=
R=lrn@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//250513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35818 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-06 19:09:44 +00:00
ajohnsen@google.com
9bf960348f
Add deprecated WebSocket constructor.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//268673018
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35791 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-06 08:56:31 +00:00
nweiz@google.com
e42cfea37f
Further code review changes for WebSocket.fromUpgradedSocket.
...
BUG=18172
R=ajohnsen@google.com , kustermann@google.com
Review URL: https://codereview.chromium.org//266653002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35764 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-05 20:28:02 +00:00
ajohnsen@google.com
e362db67d1
Clean up secure socket connect.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//262923002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35686 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-02 09:25:09 +00:00
ajohnsen@google.com
29ff79cff3
Use Socket::connect for SecureSocket as well.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//262833002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35679 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-02 06:52:11 +00:00
ajohnsen@google.com
e66cab53c0
Fix HttpRequest example.
...
The example was wrong and did not do what the text said it would.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//264843002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35624 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-01 11:07:33 +00:00
ajohnsen@google.com
deccfaf042
Make Socket::connect try all addresses given.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//259353003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35619 260f80e4-7a28-3924-810f-c04153c831b5
2014-05-01 08:42:57 +00:00
ajohnsen@google.com
9adbbd263c
Add writeHeaders argument to HttpResponse::detachSocket.
...
BUG=https://code.google.com/p/dart/issues/detail?id=18390
R=nweiz@google.com
Review URL: https://codereview.chromium.org//262433003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35571 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-30 12:37:53 +00:00
nweiz@google.com
7e1f169154
Make WebSocket.fromUpgradedSocket public.
...
This allows dart:io's WebSocket protocol code to be used in contexts
where dart:io HttpRequest and HttpResponse objects aren't available.
BUG=18172
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//234323003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35540 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 20:14:20 +00:00
ajohnsen@google.com
3265fb5d09
Make FileStat have millisecond precisions, for linux, mac and android.
...
BUG=https://code.google.com/p/dart/issues/detail?id=18442
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//252123005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35520 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-29 11:38:50 +00:00
ajohnsen@google.com
a8fa03ffbc
Clean up readAsLines*.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//251583004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35416 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-25 06:47:26 +00:00
lrn@google.com
2a93b93c1c
Remove unmodifiable map wrappers that could instead use UnmodifiableMapView.
...
R=sgjesse@google.com
Committed: https://code.google.com/p/dart/source/detail?r=35244
Review URL: https://codereview.chromium.org//214723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35361 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-24 08:51:41 +00:00
ajohnsen@google.com
826858d4ee
Int switch
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//249083004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35311 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 12:20:58 +00:00
ajohnsen@google.com
c0963f2684
Speed up headers by using a map instead of string switching.
...
BUG=
R=lrn@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//248983002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35305 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-23 07:25:31 +00:00
ajohnsen@google.com
4909ce3755
Make Stdin:readLineSync not use Streams and fix special case when Windows & disabled lineMode.
...
On Windows, disabled lineMode will not send any \n only \r on newlines.
BUG=http://code.google.com/p/dart/issues/detail?id=18283
R=lrn@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//246973002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35253 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 11:04:19 +00:00
ajohnsen@google.com
f9a46128a4
Add HttpClient:put/delete/head/patch.
...
BUG=http://code.google.com/p/dart/issues/detail?id=18168
R=lrn@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//246923003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35252 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 10:58:46 +00:00
lrn@google.com
0e24a1701c
Revert "Remove unmodifiable map wrappers that could instead use UnmodifiableMapView."
...
Some tests fail.
Review URL: https://codereview.chromium.org//246833003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35245 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 06:21:24 +00:00
lrn@google.com
04b55abe64
Remove unmodifiable map wrappers that could instead use UnmodifiableMapView.
...
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//214723002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@35244 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-22 05:53:33 +00:00
iposva@google.com
9adfe60489
- Apply review comments from https://codereview.chromium.org/232223004/
...
- Use isWindows where appropriate.
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//233093004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34934 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 17:49:31 +00:00
ajohnsen@google.com
50b3d74964
Fix File:openRead and file_input_stream_test.
...
BUG=
R=ricow@google.com
Review URL: https://codereview.chromium.org//233193004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34929 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-10 15:49:18 +00:00
ajohnsen@google.com
26ee288501
Fix leaking FD from readAs*Sync and writeAs*Sync.
...
If open was succesfull but the following read/write failed, we would
fail to close the file. We now intercept the error (as we correctly do
in the async case) and close the file before throwing the error to the
user.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//230513002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34868 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-09 10:38:32 +00:00
ajohnsen@google.com
8d44da35c4
Add bufferOutput to HttpServer, HttpResponse and HttpClientRequest.
...
Setting bufferOutput to false will disable our internal buffering, and
write the buffers directly to the socket.
BUG=https://code.google.com/p/dart/issues/detail?id=14953
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//228453002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34821 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 13:07:18 +00:00
ajohnsen@google.com
402774f9a0
Make File:openRead always have one outstanding read, when invoking callbacks.
...
This sligly improves latency for reading. Note that pause/resume is less
precise now, but it was never a guarantee exactly _when_ pausing would
take place.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//228093003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34814 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 08:58:13 +00:00
ajohnsen@google.com
364bd9eeea
Don't call read, if last read returned less bytes than was being read.
...
This speeds up File.openRead, especially for small files.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//227733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34813 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-08 08:47:51 +00:00
sgjesse@google.com
8fba00e6de
Update HTTP documentation
...
BUG= http://dartbug.com/17989
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//225323005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34733 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-04 13:05:17 +00:00
ajohnsen@google.com
1eac45f992
Clean up file writing.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//219243008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34639 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-02 08:21:55 +00:00
ajohnsen@google.com
45d35b1588
Make non-copying version of BytesBuidler and make file-reads faster.
...
The non-copying version is internally, as this is always the behaviour
we want, when receiving data from the system.
File-reads are also further improved, by only reading data in chunks, if
initial length is 0. This is a special case where the file can be a
character device. Overall improvement is around a factor of 6.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//218493012
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34589 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-01 10:56:19 +00:00
floitsch@google.com
ace6af2dc6
Fix bad HttpDate.format.
...
BUG= http://dartbug.com/17916
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//219503002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34557 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-31 15:22:16 +00:00
mcampione@google.com
071af776af
update API docs for HTTP client and server-related classes
...
BUG=
R=ajohnsen@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//210393005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34524 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 20:52:10 +00:00
ajohnsen@google.com
9da7487c36
Revert accidental parts of "Speed up toLowerCase, by manually inlining the upper-case part."
...
BUG=
Review URL: https://codereview.chromium.org//212753003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34425 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 12:32:58 +00:00
ajohnsen@google.com
a9f357b4b6
Speed up toLowerCase, by manually inlining the upper-case part.
...
Some benchmarks show up to 25% faster toLowerCase.
BUG=
R=lrn@google.com
Review URL: https://codereview.chromium.org//212163005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34423 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-26 12:19:55 +00:00
ajohnsen@google.com
fbdb9a85d8
Add optimized _OneByteString.toLowerCase.
...
BUG=
R=sgjesse@google.com , sra@google.com , srdjan@google.com
Review URL: https://codereview.chromium.org//209443005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34393 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-25 21:44:09 +00:00
ajohnsen@google.com
0ada841e52
Don't add ':443' to host header, when the connection is https.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//208333015
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34293 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-24 08:10:04 +00:00
lrn@google.com
6f76a96fcf
Introduce class Sink<T>.
...
The sink only has "add" and "close" methods. It is the supertype of both EventSink and ChunkedConversionSink.
Made startChunkedConversion take Sink as argument, but still return ChunkedConversionSink. The more specialized chunked conversion sinks are test for, just as they always were.
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//203603008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34157 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-20 10:13:01 +00:00
ajohnsen@google.com
f275c624b1
Fix documentation in dart:io.
...
BUG=https://code.google.com/p/dart/issues/detail?id=17365,https://code.google.com/p/dart/issues/detail?id=17359,https://code.google.com/p/dart/issues/detail?id=17355,https://code.google.com/p/dart/issues/detail?id=16144
R=lrn@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//203263003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33801 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-18 12:30:54 +00:00
ajohnsen@google.com
d2cad39044
Clean up style in timer_impl.
...
BUG=
R=lrn@google.com
Review URL: https://codereview.chromium.org//203253003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@33800 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-18 11:58:33 +00:00