Commit graph

27 commits

Author SHA1 Message Date
ajohnsen@google.com 10996fd256 Remove _HttpUtils from dart:io.
The Uri rewrite had all but one of these functions public available, so
they are used insted. The decodeHttpEntityString was only used by
HttpMultipartFormData, so moved to that class.

The function parseCookieDate was moved to HttpDate as a private
function. Renamed the file http_utils.dart to http_date.dart to match the content.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24783 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-05 09:51:39 +00:00
sgjesse@google.com b7260126ca Make some HTTP utility functions public
Added a new static function splitQueryString to the URI class to expose parsing of a query string without constructing a URI.

Added class HttpDate in dart:io with a few HTTP date parsing and formatting methods.

Also turned some Uri comments into dartdoc.

I have not remove the parseQueryString and decodeUrlEncodedString from _HttpUtils as they still do some non standard things that I am not sure we want to add to the URI class. These are:

* Supporting semi-colon as separator in query strings (see http://www.w3.org/TR/REC-html40/appendix/notes.html#ampersands-in-uris)
* Supporting other encodings than UTF-8 for percent encoded strings

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23972 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-13 12:19:09 +00:00
sgjesse@google.com ee02857f6a Don't change the case of cookie names and values
R=whesse@google.com
BUG=http://dartbug.com/11011

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@23582 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-04 09:35:59 +00:00
johnniwinther@google.com 5327e951f3 Handle assignability for Send and SendSet.
R=karlklose@google.com

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22925 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-21 09:40:08 +00:00
ngeoffray@google.com 70ae8f02e8 Revert r22847: some dart2dart tests fail.
Review URL: https://codereview.chromium.org//15301003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22848 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 13:56:08 +00:00
johnniwinther@google.com ff90748caa Handle assignability for Send and SendSet.
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22847 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-17 12:00:47 +00:00
johnniwinther@google.com 6625b57a44 Fix type warnings in API and helpers.
BUG=
R=ngeoffray@google.com, sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22736 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-15 13:41:37 +00:00
ajohnsen@google.com 3828f0a0b9 Add new HttpMultipartFormData, used for parsing a MimeMultipart and extracting either text or binary data.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22414 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-06 14:12:55 +00:00
sgjesse@google.com f13b6178e1 Change fromString constructor to parse static method
on HeaderValue and ContentType.

R=ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@22406 260f80e4-7a28-3924-810f-c04153c831b5
2013-05-06 07:30:02 +00:00
floitsch@google.com 9bfc844930 Refactor removeRange.
Review URL: https://codereview.chromium.org//13872007

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21462 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 15:10:23 +00:00
ajohnsen@google.com 34c499bc3f Fix HttpBodyHandler to handle missing mimeType.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@21432 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-15 11:24:33 +00:00
ajohnsen@google.com 959193b500 Buffer the entire http header to one packet, and buffer other data in chunks of 4-16 kb.
BUG=https://code.google.com/p/dart/issues/detail?id=8871

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19857 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 12:13:36 +00:00
ajohnsen@google.com 34be2d5a40 Support GZip encoding on the http server.
Rewrite how we set up http outgoing pipeline.

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19856 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-12 12:10:36 +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
sgjesse@google.com ff47888a0d Make instances of HeaderValue and ContentType immutable
Their parameters map is still mutable though.

R=ajohnsen@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19598 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-07 07:25:56 +00:00
ager@google.com 5285e357a4 Fix deprecation warnings in dart:io. Now completely warning free.
R=ajohnsen@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19478 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-05 13:27:39 +00:00
sgjesse@google.com 9021945997 Improve support for HTTP 1.0 clients
Fixed a number of issues related to HTTP 1.0 clients.

Added more HTTP 1.0 tests.

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

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19303 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-01 12:34:27 +00:00
sgjesse@google.com 6455f1ecee Change the HTTP header field names to lowercase
This simplifies the code and avoids duplicated constants in different cases.

R=ajohnsen@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18971 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 15:10:01 +00:00
lrn@google.com 3c0ac360e7 Remove deprecated string features.
Make String.codeUnits return a List.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18960 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-25 10:48:09 +00:00
sgjesse@google.com df7e3a7d0d Fix dart2js analyze _api_test for dart:io
R=johnniwinther@google.com
BUG=https://code.google.com/p/dart/issues/detail?id=8394

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@18867 260f80e4-7a28-3924-810f-c04153c831b5
2013-02-22 08:23:34 +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
floitsch@google.com fb7b9e3c5c Rename Date to DateTime.
BUG=http://dartbug.com/1424

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@17549 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-24 12:16:37 +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
sgjesse@google.com e5d693d12d Refactor handling of Transfer-Encoding
This moves more header handling to the HttpHeaders object

R=ajohnsen@google.com

TEST=tests/standalone/io/http_content_length_test.dart

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16432 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-21 10:11:05 +00:00
sgjesse@google.com af6f3267a0 Add "part of" to one file in dart:io missing it
R=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16369 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 15:19:39 +00:00
sgjesse@google.com beaf02365a Change the HTTP Content-Length handling
Move the handling of the Content-Length to the HttpHeaders
object. This makes it possible to set the Content-Length through the
headers as well as directly on HttpResponse and HttpClientRequest.

R=ajohnsen@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16357 260f80e4-7a28-3924-810f-c04153c831b5
2012-12-20 08:50:00 +00:00
sgjesse@google.com 8d0d1e87f8 Added file missing file from previous commit
TBR=ager@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@15003 260f80e4-7a28-3924-810f-c04153c831b5
2012-11-16 09:45:20 +00:00