Chromium Code Reviews| Index: sdk/lib/io/http_body_impl.dart |
| diff --git a/sdk/lib/io/http_body_impl.dart b/sdk/lib/io/http_body_impl.dart |
| index 4410a0e29b284701255b97d194b3d1f96b95ce40..d918bb09b4e8144cb3a4ddd9c021517c597dcc21 100644 |
| --- a/sdk/lib/io/http_body_impl.dart |
| +++ b/sdk/lib/io/http_body_impl.dart |
| @@ -110,6 +110,23 @@ class _HttpBodyHandler { |
| "json", |
| JSON.parse(body.body))); |
| + case "x-www-form-urlencoded": |
| + return asText(Encoding.UTF_8) |
|
Søren Gjesse
2013/05/07 13:39:29
This might as well be ASCII, as all non-alphanumer
Anders Johnsen
2013/05/07 14:04:30
Done.
|
| + .then((body) { |
| + var map = _HttpUtils.splitQueryString(body.body); |
| + var result = {}; |
| + String parse(String s) { |
| + return _HttpUtils.decodeHttpEntityString( |
| + _HttpUtils.decodeUrlEncodedString(s)); |
| + } |
| + for (var key in map.keys) { |
| + result[parse(key)] = parse(map[key]); |
| + } |
| + return new _HttpBody(contentType, |
|
Søren Gjesse
2013/05/07 13:39:29
Fits one line?
Anders Johnsen
2013/05/07 14:04:30
Done.
|
| + "form", |
| + result); |
| + }); |
| + |
| default: |
| break; |
| } |