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 # 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) ![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 Parse request bodies and query strings in Dart, as well multipart/form-data uploads. No external
dependencies required. dependencies required.

View file

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

View file

@ -1,6 +1,6 @@
name: body_parser name: body_parser
author: Tobe O <thosakwe@gmail.com> 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. description: Parse request bodies and query strings in Dart.
homepage: https://github.com/thosakwe/body_parser homepage: https://github.com/thosakwe/body_parser
dependencies: dependencies: