Commit Graph

3172 Commits

Author SHA1 Message Date
sgjesse@google.com 018b94882c Improve the handling of the connection header
* The connection header can now have multiple values
* The persistent connection state can be controlled

R=ajohnsen@google.com

BUG=dart:1995
TEST=tests/standalone/io/http_connection_header_test.dart

Review URL: https://chromiumcodereview.appspot.com//10315002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7267 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-03 07:08:32 +00:00
asiva@google.com 601d6ba9e4 Canonicalize the reference_dir also when canonicalizing a path
Review URL: https://chromiumcodereview.appspot.com//10344010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7265 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-03 01:01:47 +00:00
cshapiro@google.com 7ac663acc8 Fix two semantic errors from my previous check-in.
TBR=asiva

Review URL: https://chromiumcodereview.appspot.com//10343010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7261 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 22:48:02 +00:00
cshapiro@google.com 3a40c3eec6 Do not externalize Dart strings as C strings for "print()".
Dart strings with embedded '\0' characters cannot be faithfully
represented as a C string.

This change adds Dart_StringToBytes to the Dart API.  This function
converts a Dart string to array of UTF-8 code units and returns a
length.  Builtin::PrintString now calls Dart_StringToBytes instead of
Dart_StringToCString and, for I/O, fwrite is called instead of fprintf
with the string format specifier.

BUG=1098

Review URL: https://chromiumcodereview.appspot.com//10306002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7260 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 22:40:48 +00:00
sgjesse@google.com b0c5847ac6 Revert socket output stream changes
Also mark web_socket_test as flaky on Windows

R=ager@google.com

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10317007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7240 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 14:59:17 +00:00
ager@google.com 2596d556a9 Deal with symbolic links for file and directories on Mac and Linux.
R=sgjesse@google.com
BUG=dartbug.com/2516
TEST=

Review URL: https://chromiumcodereview.appspot.com//10309004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7228 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 11:39:21 +00:00
sgjesse@google.com a108ef203f Add a web socket client
The web socket client is a implemented as a class which is
created from from a HTTP client connection. This way it is
independent from the HTTP client and is just using the HTTP
client.

The protocol handling is mainly re-using the code from the web
socket server.

Change the handling of setting an onNoPendingWrites handler on a
socket output stream. Now setting a new onNoPendingWrites handler
will trigger a callback when there is no pending data to be
written.

Add socket detaching to the HTTP client as well. Add the ability
to get any unparsed data read from the socket for processing
after the protocol upgrade.

R=ager@google.com, ajohnsen@google.com, vsm@google.com, jacobr@google.com

BUG=dart:2001
TEST=tests/standalone/io/web_socket_test.dart

Review URL: https://chromiumcodereview.appspot.com//10262031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7224 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-02 10:30:38 +00:00
asiva@google.com cdc9b0cc60 Set up a variable so that the compiler script can be imported using an import map.
Review URL: https://chromiumcodereview.appspot.com//10280003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7208 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-01 22:15:26 +00:00
ager@google.com c2e4045ecd Fix type assertion error in dart:io File library.
R=sgjesse@google.com
BUG=dartbug.com/2776

Review URL: https://chromiumcodereview.appspot.com//10265023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7179 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-01 06:32:17 +00:00
asiva@google.com f0043a78a7 Added lib/compiler compile all VM benchmark.
Added frame lookup VM benchmark.
Review URL: https://chromiumcodereview.appspot.com//10178030

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7175 260f80e4-7a28-3924-810f-c04153c831b5
2012-05-01 01:00:04 +00:00
ager@google.com 29a3df3e1a Add the name of the file to exceptions on failed file operations.
R=sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10270012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7155 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-30 13:40:10 +00:00
mattsh@google.com cb829918ed added package_root flag to vm
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10134015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7092 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-27 17:23:00 +00:00
ager@google.com a638ccc0f7 Make sure that errors are thrown when there is no error handler
on a FileInputStream.

R=sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10206023

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7075 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-27 12:01:17 +00:00
ager@google.com 989daa8d1d Fix invalid pointer arithmetic in Linux and MacOS event handler
implementations.

R=sgjesse@google.com
BUG=dartbug.com/2759
TEST=

Review URL: https://chromiumcodereview.appspot.com//10243003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7066 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-27 11:07:01 +00:00
ager@google.com 45ee70403f Add websocket files to dummy io.dart implementation for dart2js.
Apparently this file is also used for generating API documentation
now. We need to move away from that and generate the API documentation
from the io_runtime.dart file in the SDK. The dummy implementation
file is not automatically updated and therefore this will keep
breaking.

R=ahe@google.com,rnystrom@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10254001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7063 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-27 09:30:49 +00:00
ajohnsen@google.com feae5bc171 Fix WebSocket header construction for large frames.
The spec uses 8 bytes for length if it's larger then 65535. This was
only done when appending data to the header, not when setting the header
size.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10255002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7062 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-27 09:22:22 +00:00
sgjesse@google.com ebc838c963 Check the state of the HTTP request and response when handling headers
The HTTP headers object in request and response objects is now marked
as non-mutable when it cannot be changed. An exception will be thrown
if trying to mutate headers when they are not mutable.

Postponed the sending of the headers until either the first byte of
body data is sent or the empty body is indicated. This is to allow
getting the output stream object and still be able to set headers
until the actual body is touched.

Added checking of the number of bytes of body data transmitted when an
explicit content length is specified.

R=ajohnsen@google.com

BUG=none
TEST=tests/standalone/src/io/HttpHeadersState.dart,tests/standalone/src/io/HttpContentLengthTest.dart

Review URL: https://chromiumcodereview.appspot.com//10232006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7010 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-26 11:43:32 +00:00
sgjesse@google.com 773d86e5fe Add web socket protocol processor test
Unit test of the web socket protocol processor. This test includes
testing splitting a message into several frames.

Fixed the bugs found by adding a test.

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

BUG=dart:2001
TEST=tests/standalone/src/io/WebSocketProtocolProcessorTest.dart

Review URL: https://chromiumcodereview.appspot.com//10173021

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@7008 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-26 11:12:07 +00:00
sgjesse@google.com f4a87d0e2e Initial web socket server implementation
This implements the web socket protocol as a request handler for
the HTTP server. The HTTP server have been updated with the
ability of getting the socket when a HTTP upgrade request is
processed. This way the web socket implementation is not builtin
to the HTTP server.

The API on the server is:

interface WebSocketConnection {
  void set onMessage(void callback(Object message));
  void set onClosed(void callback(int status, String reason));
  void set onError(void callback(e));

  send(Object message);
  close([int status, String reason]);
}

This API currently does not have any streaming but collects the
entire message before invoking the onMessage callback. The
current browser web socket API
(http://dev.w3.org/html5/websockets/) works the same way. The
underlying web socket protocol can have unbounded messages so
long term this probably have to change. But for now the only
likely client for a web socket server is a browser.

Currently this is missing tests. The implementation has been
tested by running the WebSocketTest.dart script and connecting
using a browser. This testing have been done using Chrome 19 and
Firefox 11.

I will be adding tests in separate change lists.

The SHA-1 and base 64 code (initially written by
ajohnsen@google.com) can be removed when these algorithms is
available in the dart:crypto.

R=ager@google.com, ajohnsen@google.com, vsm@google.com, jacobr@google.com

BUG=dart:2001
TEST=none

Review URL: https://chromiumcodereview.appspot.com//10205012

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6998 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-26 10:15:30 +00:00
ager@google.com 642f2b1c8e Fix exception throwing in connection with process starting.
For the run constructor, verify the arguments before starting the
underlying process.

R=sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10202014

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6995 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-26 08:56:27 +00:00
sgjesse@google.com 33565cd64a Change the error handling in dart:io
1. Change the argument on all onError handlers from Exception to
Dynamic

2. Throw an exception if an error ocours and there is no error handler
present for handling it.

For sockets there is the complication that an error on a socket is
reported to the socket error handler, and each of the stream error
handlers. The solution to this is to throw an exception if there was
no error handler on either the socket or one of the streams.

Fixed a number of bugs in tests revealed by errors no longer being
silently ignored.

R=ager@google.com

BUG=none
TEST=tests/standalone/src/io/*

Review URL: https://chromiumcodereview.appspot.com//10173024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6994 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-26 08:12:17 +00:00
sgjesse@google.com 11b6d128f1 Remove the RequestHandler interface from the HTTP library
Having the RequestHandler interface did no add anything, so it has
been removed. The HTTP server function addRequestHandler and setter
defaultRequestHandler now just takes function.

To use an instance of a class with a request handler member function
the Dart auto closurerization works fine.

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

BUG=none
TEST=tests/standalone/src/io/HttpServerHandlerTest.dart

Review URL: https://chromiumcodereview.appspot.com//10226002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6939 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 13:27:14 +00:00
sgjesse@google.com b2f08560d4 Add handling of the HTTP Date header
R=ajohnsen@google.com

BUG=none
TEST=none

Review URL: https://chromiumcodereview.appspot.com//10191013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6930 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-25 09:16:37 +00:00
ajohnsen@google.com 46da4845f9 Unregister callbacks from socket, when we return the socket for reuse.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10164001

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6869 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-24 06:35:08 +00:00
ager@google.com 493a76dd40 Support passing an environment variable map to child processes.
Fix minor type warning in test.

Reapplication after MacOS bug fix.

R=sgjesse@google.com
BUG=dartbug.com/2193
TEST=

Review URL: https://chromiumcodereview.appspot.com//10166029

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6827 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-23 07:54:10 +00:00
asiva@google.com ec9f430cc7 Add infrastructure to create and run benchmarks specific to some VM functionality. This is used to measure performance of specific VM functionality (similar to VM unit tests testing specific VM functionality)
run_vm_tests --benchmarks to run all benchmarks
 or
run_vm_tests CorelibCompileAll
Review URL: https://chromiumcodereview.appspot.com//10069039

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6820 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-21 01:36:23 +00:00
ager@google.com c5d347fcbc Revert "Support passing an environment variable map to child processes."
Apparently the code or the test is broken on Mac.

R=sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10163004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6795 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-20 12:53:19 +00:00
ager@google.com ee81b6f0a1 Support passing an environment variable map to child processes.
Fix minor type warning in test.

R=sgjesse@google.com
BUG=dartbug.com/2193
TEST=

Review URL: https://chromiumcodereview.appspot.com//10127008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6794 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-20 12:38:57 +00:00
turnidge@google.com 9e2c641658 Remove the deprecated method invocation and field access apis from the
dart embbedding api.  Use the new apis instead.

Fixed a bug where field/function lookup was failing for imported libs.
Added tests.  Had to add a couple of lookup functions to Library.

Fixed a bug in Dart_Invoke -- it wasn't handling a null receiver
correctly.
Review URL: https://chromiumcodereview.appspot.com//10021072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6769 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 21:04:15 +00:00
regis@google.com f955de9bc0 Throw a type error in production mode when the type of the type test is not
declared (issue 2571).
Add test.
Delete bad negative test now covered by new test.
Update status files of different compilers.
Review URL: https://chromiumcodereview.appspot.com//10035058

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6754 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 17:01:28 +00:00
sgjesse@google.com 41cc58affa Fix a number of editor errors and warnings in io tests
R=ager@google.com

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10035056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6731 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-19 09:17:14 +00:00
hausner@google.com e74cd5fc3a Static members are not visible in subclasses
Fix for issue 1598.

Lexical scope comes before inherited names. Also, Static members
are not inherited and are not visible in subclasses.
Code in the subclass (or any other code for that matter) has to
qualify the names of these members with the class name.

We had a few tests that were wrong and only passed in the VM because
this was not implemented correctly.

Also had to fix code in frog and dartdoc.

I hope I ran enough tests. I built an all.deps tree using tools/build.py from the root directory, which brought up the frog and dartdoc issues.

Tested:
tools/test.py --compiler=dart2js --runtime=drt
tools/test.py -c none -r drt
tools/test.py -c frog -r drt
tools/test.py -r vm

Review URL: https://chromiumcodereview.appspot.com//10115005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6698 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 16:09:22 +00:00
sgjesse@google.com a18d4a2f87 Add HTTP handler registration to the HTTP server
NOTE: This is a breaking change.

The onRequest callback on the HTTP server have been removed in favor
of the ability to register handlers. A handler can be either a
function or an instance of a class which implements a specific
interface. Each handler registration has a regular expression which is
matched against the request path.

There is also a default handler which can be set to handle all
requests which is not matched by any of the registered patterns. If
there is no default handler explicitly set there is a builtin one
which will just return 404 status.

Currently the method is not considered in the matching.

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

BUG=none
TEST=tests/standalone/src/io/HttpServerHandlerTest.dart

Review URL: https://chromiumcodereview.appspot.com//10119005

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6683 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 13:03:43 +00:00
ager@google.com 37b82247ac Remove need to instantiate Platform and make methods static.
This will require an update of the stable test binary. I will upload
a new build when done with the review process.

R=sgjesse@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10021048

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6682 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 11:39:16 +00:00
iposva@google.com cef84bd895 - Update the style of switch statement.
Review URL: https://chromiumcodereview.appspot.com//10083042

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6680 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 11:00:33 +00:00
whesse@google.com 7b9880570d Refactor URI processing of native extensions directive #import("dart-ext:foo").
BUG=
TEST=standalone/io/TestExtensionsTest

Review URL: https://chromiumcodereview.appspot.com//10103031

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6674 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 09:58:01 +00:00
sgjesse@google.com 9e82bc4246 Add test of the HTTP headers object
Fixed a number of bugs revealed by actually testing.

R=ajohnsen@google.com

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//9956175

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6669 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-18 06:44:58 +00:00
ager@google.com 758943e32a Add read-only environment variable access.
Map<String, String> env = new Platform().environment();

Unfortunately, this is a bit hard to test at this point. I
will move on to implement support for providing an environment
to processes that are started. At that point we can test it
properly.

Another follow-up change will be to remove the instantiation
for Platform. I would like this to be just

Map<String, String> env = Platform.environment();

R=sgjesse@google.com
BUG=dartbug.com/752
TEST=

Review URL: https://chromiumcodereview.appspot.com//10112002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6646 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 16:20:28 +00:00
ahe@google.com 56f34d7514 Move cygwin_dir to shared gypi file.
Review URL: https://chromiumcodereview.appspot.com//9877003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6626 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 11:53:56 +00:00
sgjesse@google.com 20b1747a8a Add missing properties on HttpHeader
R=ajohnsen@google.com

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10109002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6615 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-17 07:37:47 +00:00
sgjesse@google.com c9a325f704 Start refactoring of the HTTP header handling
This change moves the headers into a separate object.

There will be follow-up changes for handling whether the headers are
read-only or mutable. Also additional tests will be added later.

R=ajohnsen@google.com

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10082003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6567 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 12:18:45 +00:00
ager@google.com f366f9d913 Make it an error to call close twice on a file using the async API.
This is to make it consistent with the sync API.

Additionally, fix situations where a non-exception was passed to
error handlers on File objects.

R=sgjesse@google.com
BUG=dartbug.com/2451
TEST=standalone/io/File*

Review URL: https://chromiumcodereview.appspot.com//10095009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6564 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-16 11:32:03 +00:00
sgjesse@google.com e7f5afdbb8 Add HTTP/1.0 support and simplify persistent connections handling
The HTTP parser now recognized both HTTP/1.1 and HTTP/1.0 in
request and response headers. The only difference between the
handling of HTTP 1.1 and HTTP 1.0 is in the decection of
persistent connections. For HTTP 1.1 persistent connections are
the default and for HTTP 1.0 persistent connections are speficified
throught the "Connection: Keep-Alive" header.

Removed the getters and setters for keepAlive from all the
interfaces. They are not of much use and persistent connection
handling should be transparent. The HTTP client currently always
sends requests using HTTP 1.1 and in the reare cases where one wants the
connection to be closed after the request adding the
header "Connection: close" should work.

With this change using wget to get resources from the chat server.

R=ajohnsen@google.com

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10008083

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6509 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 10:58:58 +00:00
ager@google.com 4e1f754730 Fix Process test, fix Process factory, diable tests on dart2js.
Florian and I will investigate the dart2js failures.

R=sgjesse@google.com,floitsch@google.com
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10069053

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6502 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 09:21:54 +00:00
ager@google.com 84b0410d5a This is a request for comments.
First attempt at implementing a higher-level API for processes.
Add a startNonInteractive constructor that takes a callback which
is called with the exit code and the complete stdout and stderr
when the process terminates.

Let me know what you think. This obviously needs at least tests.
Not entirely sure what I think about the interface in the first
place.

R=sgjesse@google.com
BUG=1689
TEST=

Review URL: https://chromiumcodereview.appspot.com//9863015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6499 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-13 08:53:35 +00:00
sgjesse@google.com 49859f8d08 Add basic handling to connection upgrade to the HTTP parser
See description in runtime/bin/http_parser.dart on how the upgrade works.

R=ajohnsen@google.com

BUG=dart:2002
TEST=tests/standalone/src/io/HttpParserTest.dart

Review URL: https://chromiumcodereview.appspot.com//10068013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6464 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 14:31:47 +00:00
ager@google.com aba2e48950 Support length operation without opening file.
Use fstat instead of multiple seek calls to get length of
opened files.

R=sgjesse@google.com
BUG=dartbug.com/1592
TEST=standalone/io/File*Test

Review URL: https://chromiumcodereview.appspot.com//10065013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6459 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 11:47:32 +00:00
ajohnsen@google.com f5bccdbb14 Close socket, and not non-existing outputStream. Fixes crash in HttpServer.
BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10008075

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6455 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 09:30:49 +00:00
ajohnsen@google.com abd5d671f5 Mark as closing, when we close the connection manually.
Succeeding calls to write* would have failed without this.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com//10008072

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6454 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-12 06:41:58 +00:00
rnystrom@google.com c47bd07592 Fix merge bug.
Review URL: https://chromiumcodereview.appspot.com//10020049

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6435 260f80e4-7a28-3924-810f-c04153c831b5
2012-04-11 20:27:57 +00:00