Skip to content

Instantly share code, notes, and snippets.

@Marak
Created January 21, 2010 16:30
Show Gist options
  • Save Marak/282919 to your computer and use it in GitHub Desktop.
Save Marak/282919 to your computer and use it in GitHub Desktop.
var httpParams = {};
req.uri = url.parse(req.url);
if(typeof req.uri.query == 'undefined'){req.uri.query = '';}
req.uri.params = querystring.parse(req.uri.query);
req.uri.path = req.uri.pathname;
process.mixin(true, httpParams, req.uri.params);
multipart.parse(req).addCallback(function(parts) {
process.mixin(true, httpParams, parts);
processRequest( req , resp , httpParams );
}).addErrback(function(err){
processRequest( req , resp , httpParams );
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment