Skip to content

Commit

Permalink
Fixed extractPost method
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Willison committed Mar 19, 2010
1 parent cf87e4e commit f99a38f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions djangode.js
@@ -1,7 +1,9 @@
var http = require('http'),
sys = require('sys'),
fs = require('fs'),
url = require('url');
url = require('url'),
querystring = require('querystring')
;

function extname(path) {
var index = path.lastIndexOf('.');
Expand Down Expand Up @@ -79,7 +81,7 @@ exports.extractPost = function(req, callback) {
body += chunk;
});
req.addListener('end', function() {
callback(http.parseUri('http://fake/?' + body).params);
callback(querystring.parse(url.parse('http://fake/?' + body).query));
});
}

Expand Down

0 comments on commit f99a38f

Please sign in to comment.