Commit Graph

17 Commits

Author SHA1 Message Date
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
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
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
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
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
sgjesse@google.com 353428a918 Remove the Path class from dart:io
The Path class in dart:io has been deprecated for some time
now. It was scheduled to be removed on August 11th, so here it
goes.

dart:io still uses the Path class internally, but now it is
private. I will trim it down to what is actually used in a
follow-up change.

R=ahe@google.com, devoncarew@google.com, whesse@google.com
BUG=http://dartbug.com/11666

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@26181 260f80e4-7a28-3924-810f-c04153c831b5
2013-08-15 10:10:53 +00:00
ajohnsen@google.com 1a5ccabf14 Correctly url-decode the path segment in the http_server.
BUG=
R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24677 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-02 11:08:17 +00:00
ajohnsen@google.com 94f6029199 Add error-page support in VirtualDirectory.
BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24378 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-25 06:00:19 +00:00
ajohnsen@google.com c9b66a7973 Add new VirtualHost class to http_server package, for handling multiple hosts on multiple sources (HttpServer's).
It uses a by-name aproach, and thus depends on the host field to be
present.

BUG=
R=sgjesse@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24318 260f80e4-7a28-3924-810f-c04153c831b5
2013-06-24 10:07:19 +00:00