Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http: 451 status code "Unavailable For Legal Reasons" #4377

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/_http_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
4 changes: 2 additions & 2 deletions test/parallel/test-http-status-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -42,6 +42,6 @@ function nextTest() {


process.on('exit', function() {
assert.equal(4, testsComplete);
assert.equal(5, testsComplete);
});