This commit is contained in:
thosakwe 2017-03-07 15:42:01 -05:00
parent 1acfeeee24
commit b70b881e85
3 changed files with 4 additions and 6 deletions

View file

@ -1,9 +1,7 @@
# Body Parser
![version 1.0.0-dev+5](https://img.shields.io/badge/version-1.0.0--dev+5-red.svg)
![version 1.0.0](https://img.shields.io/badge/version-1.0.0-brightgreen.svg)
![build status](https://travis-ci.org/thosakwe/body_parser.svg)
**NOT YET PRODUCTION READY**
Parse request bodies and query strings in Dart, as well multipart/form-data uploads. No external
dependencies required.

View file

@ -26,9 +26,9 @@ Future<BodyParseResult> parseBody(HttpRequest request,
Future<String> getBody() async {
if (storeOriginalBuffer) {
List<int> bytes = await getBytes();
return UTF8.decode(result.originalBuffer = bytes);
return Uri.decodeFull(UTF8.decode(result.originalBuffer = bytes));
} else
return await request.transform(UTF8.decoder).join();
return await request.transform(UTF8.decoder).join().then(Uri.decodeFull);
}
try {

View file

@ -1,6 +1,6 @@
name: body_parser
author: Tobe O <thosakwe@gmail.com>
version: 1.0.0-dev+5
version: 1.0.0
description: Parse request bodies and query strings in Dart.
homepage: https://github.com/thosakwe/body_parser
dependencies: