diff --git a/README.md b/README.md index e27c829e..a24ce468 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Body Parser -![version 1.0.0](https://img.shields.io/badge/version-1.0.0-brightgreen.svg) +![version 1.0.01(https://img.shields.io/badge/version-1.0.1-brightgreen.svg) ![build status](https://travis-ci.org/thosakwe/body_parser.svg) Parse request bodies and query strings in Dart, as well multipart/form-data uploads. No external diff --git a/lib/src/map_from_uri.dart b/lib/src/map_from_uri.dart index 81d110ca..15ca9f4b 100644 --- a/lib/src/map_from_uri.dart +++ b/lib/src/map_from_uri.dart @@ -10,7 +10,8 @@ buildMapFromUri(Map map, String body) { if (keyValuePair.contains('=')) { var equals = keyValuePair.indexOf('='); String key = Uri.decodeQueryComponent(keyValuePair.substring(0, equals)); - String value = keyValuePair.substring(equals + 1); //Uri.decodeQueryComponent(split[1]); + String value = + Uri.decodeQueryComponent(keyValuePair.substring(equals + 1)); if (parseArrayRgx.hasMatch(key)) { Match queryMatch = parseArrayRgx.firstMatch(key); @@ -34,8 +35,9 @@ buildMapFromUri(Map map, String body) { targetMap[keys[i]] = getValue(value); } } - } - else map[key] = getValue(value); - } else map[Uri.decodeQueryComponent(keyValuePair)] = true; + } else + map[key] = getValue(value); + } else + map[Uri.decodeQueryComponent(keyValuePair)] = true; } -} \ No newline at end of file +} diff --git a/pubspec.yaml b/pubspec.yaml index 2eeabbdd..fde9ce06 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: body_parser author: Tobe O -version: 1.0.0 +version: 1.0.1 description: Parse request bodies and query strings in Dart. homepage: https://github.com/thosakwe/body_parser dependencies: