summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNathan Rajlich <nathan@tootallnate.net>2013-11-04 09:39:29 -0800
committerNathan Rajlich <nathan@tootallnate.net>2013-11-04 09:39:29 -0800
commit9bc53d887ad8b7da1b6656a14ccc56fa3312bda5 (patch)
tree82a0c715cf79d00f3dc197dae1d3d1cddd185851 /lib
parent962686b67b995edab7b87ef8fba024eed24ae92d (diff)
downloadnodejs-9bc53d887ad8b7da1b6656a14ccc56fa3312bda5.tar.gz
nodejs-9bc53d887ad8b7da1b6656a14ccc56fa3312bda5.tar.bz2
nodejs-9bc53d887ad8b7da1b6656a14ccc56fa3312bda5.zip
http: make DELETE requests set `req.method`
Fixes #6461.
Diffstat (limited to 'lib')
-rw-r--r--lib/_http_common.js3
1 files changed, 2 insertions, 1 deletions
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 {