diff --git a/lib/util/http.js b/lib/util/http.js index ae9e69f..130ba58 100644 --- a/lib/util/http.js +++ b/lib/util/http.js @@ -26,6 +26,10 @@ exports.setup = function(req, res, next) { if(~req.url.indexOf('?')) { try { req.query = parseQuery(req.url); + m = req.query['_method'] + if ( m ) { + req.method = m.toUpperCase() + } } catch (ex) { res.setHeader('Content-Type', 'text/plain'); res.statusCode = 400; @@ -130,4 +134,4 @@ exports.redirect = function(res, url, statusCode) { var autoParse = { 'application/x-www-form-urlencoded': parseBody, 'application/json': parseBody -}; \ No newline at end of file +};