Permalink
Browse files

Fixed extractPost method

  • Loading branch information...
1 parent cf87e4e commit f99a38f9e6ca3b81aa649d6f0f7d553572d91bd8 Simon Willison committed Mar 19, 2010
Showing with 4 additions and 2 deletions.
  1. +4 −2 djangode.js
View
@@ -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('.');
@@ -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));
});
}

0 comments on commit f99a38f

Please sign in to comment.