parent
962686b67b
commit
9bc53d887a
@ -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 {
|
||||
|
@ -24,9 +24,9 @@ var assert = require('assert');
|
||||
var net = require('net');
|
||||
var http = require('http');
|
||||
|
||||
// Test that the PATCH and PURGE verbs get passed through correctly
|
||||
// Test that the DELETE, PATCH and PURGE verbs get passed through correctly
|
||||
|
||||
['PATCH', 'PURGE'].forEach(function(method, index) {
|
||||
['DELETE', 'PATCH', 'PURGE'].forEach(function(method, index) {
|
||||
var port = common.PORT + index;
|
||||
|
||||
var server_response = '';
|
||||
|
Loading…
x
Reference in New Issue
Block a user