diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-10-28 13:44:41 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-10-28 13:57:22 +0100 |
commit | 4c0195e0340220e53fe5c44299eff53f2f0e210c (patch) | |
tree | 1657763ab4333e63e2798e1de5e0afd247a14385 /lib/_http_common.js | |
parent | 610022851aaeff7a96518a8ee04826547dc33969 (diff) | |
download | node-new-4c0195e0340220e53fe5c44299eff53f2f0e210c.tar.gz |
http: remove MethodToString()
The list of supported HTTP methods is available in JS land now so there
is no longer any need to pass a stringified version of the method to the
parser callback, it can look up the method name for itself.
Saves a call to v8::Eternal::Get() in the common case and a costly
v8::String::NewFromOneByte() in the uncommon case.
Diffstat (limited to 'lib/_http_common.js')
-rw-r--r-- | lib/_http_common.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_http_common.js b/lib/_http_common.js index 3bc1346cc3..2fb5bd818d 100644 --- a/lib/_http_common.js +++ b/lib/_http_common.js @@ -92,7 +92,7 @@ function parserOnHeadersComplete(info) { if (info.method) { // server only - parser.incoming.method = info.method; + parser.incoming.method = HTTPParser.methods[info.method]; } else { // client only parser.incoming.statusCode = info.statusCode; |