diff --git a/lib/_http_server.js b/lib/_http_server.js index f88593b9974e7a..d6b2d7e88e32a7 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 4422124a8cf70d..9e78b5575bd777 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); });