diff --git a/lib/_http_server.js b/lib/_http_server.js index e2221b759b..f524790fb2 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -65,6 +65,7 @@ const STATUS_CODES = exports.STATUS_CODES = { 428 : 'Precondition Required', // RFC 6585 429 : 'Too Many Requests', // RFC 6585 431 : 'Request Header Fields Too Large',// RFC 6585 + 451 : 'Unavailable For Legal Reasons', 500 : 'Internal Server Error', 501 : 'Not Implemented', 502 : 'Bad Gateway', diff --git a/test/parallel/test-http-status-code.js b/test/parallel/test-http-status-code.js index 19c36b0b2f..5fedb529f8 100644 --- a/test/parallel/test-http-status-code.js +++ b/test/parallel/test-http-status-code.js @@ -7,7 +7,7 @@ var http = require('http'); // ServerResponse.prototype.statusCode var testsComplete = 0; -var tests = [200, 202, 300, 404, 500]; +var tests = [200, 202, 300, 404, 451, 500]; var testIdx = 0; var s = http.createServer(function(req, res) { @@ -42,6 +42,6 @@ function nextTest() { process.on('exit', function() { - assert.equal(4, testsComplete); + assert.equal(5, testsComplete); });