From 9bc53d887ad8b7da1b6656a14ccc56fa3312bda5 Mon Sep 17 00:00:00 2001 From: Nathan Rajlich Date: Mon, 4 Nov 2013 09:39:29 -0800 Subject: http: make DELETE requests set `req.method` Fixes #6461. --- lib/_http_common.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/_http_common.js b/lib/_http_common.js index 2fb5bd818..7d89b8666 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -27,6 +27,7 @@ var IncomingMessage = incoming.IncomingMessage; var readStart = incoming.readStart; var readStop = incoming.readStop; +var isNumber = require('util').isNumber; var debug = require('util').debuglog('http'); exports.debug = debug; @@ -90,7 +91,7 @@ function parserOnHeadersComplete(info) { parser.incoming._addHeaderLines(headers, n); - if (info.method) { + if (isNumber(info.method)) { // server only parser.incoming.method = HTTPParser.methods[info.method]; } else { -- cgit v1.2.3