Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Returns middleware that only parsers `json`. The options are:

### bodyParser.urlencoded([options])

Returns middleware that only parses `urlencoded` with the [qs](https://github.com/visionmedia/node-querystring) module. The options are:
Returns middleware that only parses `urlencoded` with the [querystring](http://nodejs.org/api/querystring.html#querystring_querystring_parse_str_sep_eq_options) module. The options are:

- `limit` <1mb> - maximum request body size

Expand All @@ -57,4 +57,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
THE SOFTWARE.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var getBody = require('raw-body');
var http = require('http');
var qs = require('qs');
var querystring = require('querystring');

exports = module.exports = bodyParser;
exports.json = json;
Expand Down Expand Up @@ -86,7 +86,7 @@ function urlencoded(options){

try {
req.body = buf.length
? qs.parse(buf)
? querystring.parse(buf) // default maxKeys 1000
: {};
} catch (err){
err.body = buf;
Expand Down Expand Up @@ -115,4 +115,4 @@ function error(code, msg) {
var err = new Error(msg || http.STATUS_CODES[code]);
err.status = code;
return err;
}
}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
"url": "https://github.com/expressjs/body-parser/issues"
},
"dependencies": {
"raw-body": "~1.1.2",
"qs": "~0.6.6"
"raw-body": "~1.1.2"
},
"devDependencies": {
"connect": "*",
Expand Down