Commit Graph

43 Commits

Author SHA1 Message Date
nweiz@google.com f4533a552b Add utility methods for sending non-form data in pkg/http.
R=rnystrom@google.com
BUG=8380

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30183 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-12 01:59:39 +00:00
floitsch@google.com 74da0c7286 Remove usage of dart:json.
R=jmesserly@google.com, lrn@google.com, nweiz@google.com, rnystrom@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26789 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-28 14:05:11 +00:00
floitsch@google.com 35d7140e66 Remove Encoding-enum from dart:io and add interface in dart:convert.
BUG= http://dartbug.com/6284
BUG= http://dartbug.com/7966
R=nweiz@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26632 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-26 10:37:25 +00:00
kevmoo@j832.com 18d38085ab pkg: analysis aided cleanup
Removed a lot of warnings and hints when opening many pkg projects in the editor

R=gram@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25831 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-06 20:42:04 +00:00
gram@google.com fb62473ebf Add missing newline after Actual value in fail message.
Remove the BasMatcher class; it made some sense when we had both 'interface'
and 'class' but adds no value now.
Fix a comment in the CustomMatcher documentation.
Fix tests affected by these changes.

R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@25356 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-23 19:48:26 +00:00
gram@google.com 50c5137e55 Change MatchState to Map.
R=sigmund@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24046 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-14 19:46:16 +00:00
ajohnsen@google.com 04b7752d32 Remove references to RedirectLimitExceededException.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23851 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 13:45:16 +00:00
ajohnsen@google.com 5ce3b9ddea Clean up dart:io exceptions.
- Introduce IOException.
- Remove HttpParserException.
- Merge RedirectLimitExceededException and RedirectLoopException into
RedirectException.
- Remove 'IO' from FileIOException, DirectoryIOException, LinkIOException
and SocketIOException.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23848 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-11 13:15:46 +00:00
sgjesse@google.com 69df933ff3 Remove the HttpRequest.queryParameters getter
The parsed query parameters are now now available from the Uri object.

TBR=whesse@google.com

BUG=http://dartbug/2641

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23413 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-30 13:39:24 +00:00
sgjesse@google.com 9d6a64e81b Merge the dart:uri library into dart:core and update the Uri class
This merges the dart:uri library into dart:core removing the dart:uri library. Besides moving the library the Url class has been changed.

* Removed existing Uri constructor as it was equivalent with Uri.parse
* Remamed constructor Uri.fromComponents to Uri
* Moved toplevel function encodeUriComponent to static method Uri.encodeComponent
* Moved toplevel function decodeUriComponent to static method Uri.decodeComponent
* Moved toplevel function encodeUri to static method Uri.encodeFull
* Moved toplevel function decodeUri to static method Uri.decodeFull
* Rename domain to host
* Added static methods Uri.encodeQueryComponent and Uri.decodeQueryComponent
* Added support for path generation and splitting
* Added support for query generation and splitting
* Added some level of normalization

R=floitsch@google.com, lrn@google.com, nweiz@google.com, scheglov@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23266 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-28 13:35:01 +00:00
kustermann@google.com 0cea864629 Only stop HTTP server if it was actually started.
Review URL: https://codereview.chromium.org//14052008

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21939 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 11:32:27 +00:00
ajohnsen@google.com 55963a1a6d Add new InternetAddress class with a static lookup function (including IPv6
results).

Reapply of https://codereview.chromium.org/13880029/ with fixes.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21934 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 09:26:58 +00:00
ajohnsen@google.com 60946b53fc Revert "Add new InternetAddress class with a static lookup function (including IPv6 results)."
Revert "Attempt to fix strict align issue."
Revert "Trying another fix."

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21928 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 08:10:00 +00:00
ajohnsen@google.com 20d1f5ddda Add new InternetAddress class with a static lookup function (including IPv6 results).
Reapply of https://codereview.chromium.org/14083007/ with fixes.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21923 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-24 07:12:05 +00:00
nweiz@google.com c590e8ae0c Switch pkg packages, pub, and dartdoc to use package: imports.
This also changes the SDK layout by replacing the "pkg" directory, which
contained the full source of all the packages needed by pub and dartdoc, with a
"packages" directory that contains only their lib directories. This directory is
used as the package root for pub and dartdoc when run from the SDK.

BUG=6745

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20640 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-28 20:27:28 +00:00
nweiz@google.com 6cd9cee512 Provisionally stop working around issues 9252 and 9253.
We're removing these workarounds in the hopes that the pub tests won't resume
flaking. If they do, this CL should be rolled back.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20286 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-20 19:49:05 +00:00
nweiz@google.com 8f7295dce7 Work around issue 9252 in scheduled_test and pkg/http.
Review URL: https://codereview.chromium.org//12540010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20187 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-19 00:25:05 +00:00
nweiz@google.com a9a8d42063 Add a SafeHttpServer shim to work around issue 9140.
Review URL: https://codereview.chromium.org//12633015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20054 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-14 22:12:19 +00:00
sgjesse@google.com b6096848b1 Make IOSink implement StringSink
Besides adding the StringSink methods I also added writeBytes and
deprecated both add and addString.

To handle the encoding of strings the IOSike has an encoding
property. This property is mutable in situation when it makes sense to
change encoding of what is written. The exception here is for HTTP
where the encoding is determined from the header and the encoding
cannot be changed.

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

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19676 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-08 10:06:28 +00:00
nweiz@google.com 63a8d1271f Change MultipartFile.fromFile to MultipartFile.fromPath in pkg/http.
This re-commits r19185, with all package: imports removed from pkg/http so that
it can transitively depend on pkg/path without breaking pub. This also marks
pkg/http/multipart_test as skipped temporarily (see issue 8843).

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19194 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-28 01:16:10 +00:00
nweiz@google.com 4eb2c68adf Fix a dartc error for pkg/http/multipart_test.
BUG=7458

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19180 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-27 22:55:22 +00:00
sgjesse@google.com 488b016a2f Merge IO v2 branch to bleeding edge
R=ager@google.com, ajohnsen@google.com, whesse@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18820 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-21 11:58:11 +00:00
nweiz@google.com b2a13038b2 Always treat headers as individual strings in pkg/http.
BUG=8049

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17819 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-30 00:06:40 +00:00
sigmund@google.com aeca565ae9 Fix build for throwsStateError: remove duplicate definitions in other tests.
Review URL: https://codereview.chromium.org//12088056

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17812 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-29 21:47:05 +00:00
floitsch@google.com ed938af868 Rename new Uri.fromString to Uri.parse.
Review URL: https://codereview.chromium.org//12052038

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17562 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 13:26:18 +00:00
hausner@google.com a885f8638b Fix map literals from change 17410
Remove any type arguments from map literals
that had one type argument before change 17410.
Review URL: https://codereview.chromium.org//12045024

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17412 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-22 17:31:29 +00:00
hausner@google.com dc3bf6646a Stop supporting map literals with 1 type argument
To be checked in next week Tue (Jan 22)

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17410 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-22 16:48:00 +00:00
nweiz@google.com 013b0104f5 Add an ErrorGroup class to Pub.
Review URL: https://codereview.chromium.org//11941003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17106 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-16 00:12:30 +00:00
nweiz@google.com fcff2fb2d9 Fix ALL the pub tests.
Review URL: https://codereview.chromium.org//11830017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16888 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 21:37:40 +00:00
nweiz@google.com 5741f611ba Update pkg/http to use the new async APIs.
Review URL: https://codereview.chromium.org//11825010

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16834 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-09 03:10:42 +00:00
floitsch@google.com 4a7dfd2da3 Big merge from experimental to bleeding edge.
Review URL: https://codereview.chromium.org//11783009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16687 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 11:23:16 +00:00
rnystrom@google.com ac04fc6c18 Convert pkg/http to use "package:" imports.
Review URL: https://codereview.chromium.org//11746009

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16620 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-04 00:10:47 +00:00
nweiz@google.com a8eb61fb8b Fix analyzer errors and warnings for pkg/http.
BUG=7458

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16238 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-18 00:26:15 +00:00
sgjesse@google.com 93514a3b28 Reapply "Stop working around issue 6984."
Originally committted in r15804 and reverted in r15825.

Issue 6984 should be fixed by r15951.

R=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15961 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-11 10:03:21 +00:00
nweiz@google.com 29318c2f5c Revert "Stop working around issue 6984."
Review URL: https://codereview.chromium.org//11464015

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15825 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-07 00:09:19 +00:00
nweiz@google.com 01dd8fcb4e Stop working around issue 6984.
Review URL: https://codereview.chromium.org//11464006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15804 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-06 20:50:21 +00:00
nweiz@google.com 558ffd19bf Work around issue 6984.
This ensures that before an HTTP response is closed, its corresponding
request is drained of input.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15476 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 22:43:10 +00:00
nweiz@google.com 06e7344e22 Make #maxRedirects and #followRedirects work for the dart:io HTTP client.
Review URL: https://codereview.chromium.org//11414195

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15433 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-28 01:54:16 +00:00
nweiz@google.com 47393b62a0 Add an HTTP client based on Curl.
Review URL: https://codereview.chromium.org//11394003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14811 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-12 22:01:14 +00:00
sgjesse@google.com ada7ba7414 Add debug print to try to find the issue with test pkg/http/test/request_test.dart
The flakines of the test have not been reproduced locally (neither on
Linux nor on Windows). Adding debug print for more diagnstics.

R=ahe@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14579 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-06 15:57:39 +00:00
nweiz@google.com 549efe3bdf Add an HTTP library that wraps dart:io.
Review URL: https://codereview.chromium.org//11363063

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14502 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 20:55:01 +00:00
nweiz@google.com e6a33d23fb Reverting 14496
Review URL: https://codereview.chromium.org//11293075

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14498 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 20:13:14 +00:00
nweiz@google.com f6f3e1d556 Add an HTTP library that wraps dart:io.
Review URL: https://codereview.chromium.org//11338054

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@14496 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-02 19:45:04 +00:00