diff options
author | Nathan Rajlich <nathan@tootallnate.net> | 2013-11-04 09:39:29 -0800 |
---|---|---|
committer | Nathan Rajlich <nathan@tootallnate.net> | 2013-11-04 09:39:29 -0800 |
commit | 9bc53d887ad8b7da1b6656a14ccc56fa3312bda5 (patch) | |
tree | 82a0c715cf79d00f3dc197dae1d3d1cddd185851 /lib | |
parent | 962686b67b995edab7b87ef8fba024eed24ae92d (diff) | |
download | nodejs-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.js | 3 |
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 { |