kevmoo@google.com
4e87f2a87c
pkg/http_server: move to multi-lib layout
...
Dependencies between features are now crystal clear
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//756493002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41936 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-24 18:14:19 +00:00
sgjesse@google.com
1e4c88c97b
Don't to do HTML entity decoding for multi-part form fields
...
The code was trying to do HTML entity decoding on text field values
in multipart form posts. This has been removed as it did not work.
The parsing was expecting HTML entities to always be used, but that is
not the case. Chrome, Firefox and Safari will do it if e.g. the attribute
accept-charset="latin1" is set on the HTML form element, but the default
when accept-charset is not set or is set to utf8 UTF-8 encoding will be
used.
Also when HTML entity encoding is used, the encoding done by the browser
cannot be consistently decoded. E.g. if the value '&#<some large char>' is
entered in a form with accept-charset="latin1" the value in the
multipart/form-data response is '&#ひ' (<some large char> is HTML
entity encoded as ひ), so '&#' is not escaped in any way.
Passing the value returned by the browser into user code without trying to
be clever is the right thing to do.
R=kustermann@google.com
BUG=
Review URL: https://codereview.chromium.org//730203008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41821 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-19 07:41:17 +00:00
sgjesse@google.com
7086214a4e
Handle multipart MIME parsing with no parts
...
The multipart MIME parser did not correctly handle the case where there
was only the final boundary.
R=kustermann@google.com
BUG=
Review URL: https://codereview.chromium.org//739533002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41805 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-18 14:40:00 +00:00
sgjesse@google.com
82ba3ad49b
Fix a number of issues with the Range header handling for serving files
...
* Handling end position after file length
* Handling suffix range longer than file length
* Ignore syntactically invalid Range headers
* Return 416 (Requested range not satisfiable) if start < end
Added tests for these cases.
BUG=http://dartbug.com/21587
R=ajohnsen@google.com , kustermann@google.com
Review URL: https://codereview.chromium.org//721213002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@41775 260f80e4-7a28-3924-810f-c04153c831b5
2014-11-17 14:21:09 +00:00
ajohnsen@google.com
979f82002f
Add 'pathPrefix' optional argument to VirtualDirectory constructor.
...
By setting the pathPrefix, all incoming requests are expected to have
its uri starting with the path. Then, before doing resource lookup, the
prefix is trimmed from the path.
BUG=https://code.google.com/p/dart/issues/detail?id=17353
R=kevmoo@google.com
Review URL: https://codereview.chromium.org//424063002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38720 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-30 06:50:23 +00:00
nweiz@google.com
1e72a8f408
Remove documentation links for repo packages.
...
pub.dartlang.org will now automatically link to dartdocs.org for
packages with no documentation link.
BUG= http://dartbug.com/20177 , http://dartbug.com/20178 , http://dartbug.com/20186
R=sigmund@google.com
Review URL: https://codereview.chromium.org//416973003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38551 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-24 20:23:52 +00:00
ajohnsen@google.com
d3411334c8
Fix links of VirtualDirectory.
...
BUG=https://code.google.com/p/dart/issues/detail?id=19717
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//370753002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@38010 260f80e4-7a28-3924-810f-c04153c831b5
2014-07-04 12:04:25 +00:00
ajohnsen@google.com
2eb4efb5eb
Don't use å in non-ascii test, as it can have multiple representations.
...
BUG=
Review URL: https://codereview.chromium.org//356843004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37781 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-27 09:47:05 +00:00
ajohnsen@google.com
4c9f0be0fc
Use utf-8 encoding for listing and error page, in http_server VirtualDirectory.
...
BUG=https://code.google.com/p/dart/issues/detail?id=15157
R=ricow@google.com
Review URL: https://codereview.chromium.org//360453004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37779 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-27 09:11:25 +00:00
nweiz@google.com
02cf36609a
Add an http_multi_server package.
...
This package supports using the same server class for multiple bound interfaces.
In particular, it's useful for binding both IPv4 and IPv6 loopback interfaces.
R=rnystrom@google.com
BUG=19147
Review URL: https://codereview.chromium.org//311233004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37023 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-05 00:43:37 +00:00
ajohnsen@google.com
e229ac6db2
Fix long line.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//227133004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34773 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-07 09:27:27 +00:00
ajohnsen@google.com
2333d0916a
Don't create special path characters on windows.
...
BUG=
Review URL: https://codereview.chromium.org//226183013
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34770 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-07 07:36:14 +00:00
ajohnsen@google.com
75a0668f6d
Fix XSS issues in http_server's dir-listing and error-page.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//225813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34769 260f80e4-7a28-3924-810f-c04153c831b5
2014-04-07 07:03:24 +00:00
kevmoo@google.com
1e7466a677
pkg/http_server: fixes for unittest deprecations
...
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//217143002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@34506 260f80e4-7a28-3924-810f-c04153c831b5
2014-03-28 16:37:57 +00:00
kevmoo@google.com
97835dc3a6
pkg/unittest: added LICENSE
...
R=rnystrom@google.com
Review URL: https://codereview.chromium.org//135343002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31750 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-13 18:07:45 +00:00
kevmoo@google.com
a300ce0a1d
pkg/http_server: return future for VirtualDirectory serveRequest
...
Also:
- Return the subscription from serve method
- Bumped version
BUG= https://code.google.com/p/dart/issues/detail?id=15893
BUG= https://code.google.com/p/dart/issues/detail?id=16005
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//124833003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31701 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-10 19:27:05 +00:00
ajohnsen@google.com
41dfdb599c
Make VirtualDirectory redirect if the directory-path does not end with a tailing slash.
...
BUG=https://code.google.com/p/dart/issues/detail?id=15764
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//119453005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31651 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-09 10:26:54 +00:00
kevmoo@google.com
2c286cf7d0
pkg/http_server: fix broken test
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org//126453002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31573 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-07 21:03:18 +00:00
kevmoo@google.com
4f64d474ef
pkg/http_server more virtual dir test cleanup
...
Preparing for https://code.google.com/p/dart/issues/detail?id=15893 fix
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//120343005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31567 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-07 19:37:27 +00:00
kevmoo@google.com
a8dc1227be
pkg/http_server: follow on to r31466
...
missed up one test, fixed whitespace
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//102743004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31471 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-06 12:10:53 +00:00
ajohnsen@google.com
989f6e1d5d
Fix Directory path in VirtualDirectory, so it always ends with a platform-specific seperator. That'll make sure Uri.resolve always works.
...
BUG=http://code.google.com/p/dart/issues/detail?id=15764
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//125003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31469 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-06 10:44:14 +00:00
kevmoo@google.com
3a73a2ed5c
pkg/http_server: virtual dir test cleanup
...
...and test util tweaks
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//124693002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31466 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-05 22:21:16 +00:00
kevmoo@google.com
e2607cff65
pkg/http_server: removed unused imports
...
R=sigmund@google.com
Review URL: https://codereview.chromium.org//123283003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31464 260f80e4-7a28-3924-810f-c04153c831b5
2014-01-04 04:05:11 +00:00
sethladd@google.com
fed1b85164
move contents of readme into library docs
...
BUG=
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//113733002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31104 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-12 17:12:21 +00:00
nweiz@google.com
113bd79bc6
Make pkg/path 1.0.0 and upgrade dependencies appropriately.
...
All existing packages that use pkg/path (other than pkg/stack_trace,
which has already been updated) are compatible with both the pre-1.0
and post-1.0 path API, so I've marked their version constraints as
">=0.9.0 <2.0.0". I've also incremented their patch versions and I
intend to release new versions as soon as this CL lands.
R=alanknight@google.com , efortuna@google.com , jmesserly@google.com , rnystrom@google.com , scheglov@google.com
Review URL: https://codereview.chromium.org//110873002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@31005 260f80e4-7a28-3924-810f-c04153c831b5
2013-12-10 00:24:01 +00:00
dgrove@google.com
18ca7d0036
Re-land r29957 (add versions and constraints for packages and samples), with
...
SDK constraints bumped from 1.0.0 to 0.8.10+6 .
R=ricow@google.com , sigmund@google.com
Review URL: https://codereview.chromium.org//62473002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29986 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 18:28:22 +00:00
ajohnsen@google.com
61f6c51990
Revert "add versions and constraints for packages and samples"
...
This is currently blocking us from testing samples.
BUG=
R=kasperl@google.com
Review URL: https://codereview.chromium.org//59513007
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29960 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 09:09:18 +00:00
jmesserly@google.com
02638c5760
add versions and constraints for packages and samples
...
- all packages at 0.9.0, except "analyzer" which had a version already
- dependencies at ">=0.9.0 <0.10.0" except analyzer is ">=0.10.0 <0.11.0"
- sdk constraint ">=1.0.0 <2.0.0"
R=sigmund@google.com
Review URL: https://codereview.chromium.org//59763006
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29957 260f80e4-7a28-3924-810f-c04153c831b5
2013-11-06 03:27:58 +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
69205c207c
Remove uses of Options from pkg, samples, tests, and third_party directories.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//52573002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29552 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-30 15:17:01 +00:00
amouravski@google.com
60b57c3a38
Update headings to use sentence case.
...
R=kathyw@google.com
Review URL: https://codereview.chromium.org//51003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29462 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 17:23:32 +00:00
ajohnsen@google.com
e2434065ce
Expose 'serveFile' on VirtualDirectory.
...
This makes it possible to easy forward directory requets to e.g.
'index.html'.
BUG=http://code.google.com/p/dart/issues/detail?id=14333
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//47513008
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29430 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-29 10:17:30 +00:00
ajohnsen@google.com
bc7c3b0301
The request may be canceled by http_body, thus allow that when testing.
...
BUG=https://code.google.com/p/dart/issues/detail?id=14381
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//46043003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29358 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-28 13:20:24 +00:00
sethladd@google.com
d0f5d11552
http_server depends on path
...
BUG=
R=ajohnsen@google.com
Review URL: https://codereview.chromium.org//47313002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@29330 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-27 19:19:39 +00:00
ajohnsen@google.com
7ed07c2bc8
Fix typo in http_body_test.
...
BUG=
R=ricow@google.com
Review URL: https://codereview.chromium.org//34423003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28983 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 06:03:45 +00:00
ajohnsen@google.com
08239af74a
Wait for server response in http_body_test before closing client and server.
...
BUG=https://code.google.com/p/dart/issues/detail?id=14275
Review URL: https://codereview.chromium.org//34383002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28982 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-22 05:40:40 +00:00
ajohnsen@google.com
31bfc41409
Make setDirectoryHandler and setErrorPageHandler setters, and add a jailRoot property.
...
While being on by default, disabling jailRoot allows following links to
outside the root directory.
BUG=https://code.google.com/p/dart/issues/detail?id=14196,https://code.google.com/p/dart/issues/detail?id=14193
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//31633003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28926 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 12:21:04 +00:00
ajohnsen@google.com
64bc9874f9
Add README file for http_server package.
...
BUG=https://code.google.com/p/dart/issues/detail?id=14192
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//32003002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28923 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 09:21:37 +00:00
ajohnsen@google.com
e598c1c6e2
Fix comment.
...
BUG=
Review URL: https://codereview.chromium.org//31633005
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28922 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 08:53:03 +00:00
ajohnsen@google.com
2c02feaa38
Expose the HttpRequest object in HttpRequestBody, making all request properties available.
...
BUG=https://code.google.com/p/dart/issues/detail?id=14259
R=sethladd@google.com , sgjesse@google.com
Review URL: https://codereview.chromium.org//31813002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28919 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-21 08:07:11 +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
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
ajohnsen@google.com
326f48d476
Expand usage of defaultEncoding in HttpBody in the http_server package.
...
This fixes a few cases where other default encodings was used. Given
that we operate with the concept of a default encoding, to use that
encoding makes more sense.
BUG=https://code.google.com/p/dart/issues/detail?id=13928
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//26685004
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28453 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-10 14:08:55 +00:00
whesse@google.com
428e84e7d4
Use Directory.systemTemp getter in pkg subdirectory of repository.
...
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//25731003
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@28218 260f80e4-7a28-3924-810f-c04153c831b5
2013-10-03 13:12:10 +00:00
lrn@google.com
12c9510193
Update implementations to use Object.identityHashCode for identity map/set
...
Update map/set constructors to have an .identity() constructor as well.
R=floitsch@google.com
Review URL: https://codereview.chromium.org//24267023
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27869 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-25 09:43:43 +00:00
ajohnsen@google.com
1dba2c2cab
Change Uri methods taking a decode argument, to now take an encoding.
...
This finished the integration of dart:convert into Uri.
BUG=
R=sgjesse@google.com
Review URL: https://codereview.chromium.org//24122002
git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27426 260f80e4-7a28-3924-810f-c04153c831b5
2013-09-12 11:09:38 +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