From 01c089f0131c0b4f645151e7d5f9e9f79de73cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D1=8F=20=D0=BA=D0=BE=D1=82=D0=B8=D0=BA=20=D0=BF=D1=83?= =?UTF-8?q?=D1=80-=D0=BF=D1=83=D1=80?= Date: Wed, 25 Apr 2018 15:49:04 +0300 Subject: [PATCH 1/2] Fix capitalization of HTTP 418 I'm a Teapot Update the message to be consistent with RFC 7168, and the rest of the statuses. --- lib/_http_server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/_http_server.js b/lib/_http_server.js index bf228de643422e..84886136cedccd 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -93,7 +93,7 @@ const STATUS_CODES = { 415: 'Unsupported Media Type', 416: 'Range Not Satisfiable', 417: 'Expectation Failed', - 418: 'I\'m a teapot', // RFC 2324 + 418: 'I\'m a Teapot', // RFC 2324, 7168 421: 'Misdirected Request', 422: 'Unprocessable Entity', // RFC 4918 423: 'Locked', // RFC 4918 From 87dcaedc596b057ffb8af8aedc7417f9c505fce3 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Mon, 14 May 2018 15:30:08 +0200 Subject: [PATCH 2/2] http: update comments on HTTP status codes Adding comments to reference which RFC Node.js is following. Refs: https://tools.ietf.org/html/rfc7231#section-6.4.1 Refs: https://tools.ietf.org/html/rfc7168#section-2.3.3 --- lib/_http_server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/_http_server.js b/lib/_http_server.js index 84886136cedccd..4ee1f5f473e06a 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -67,7 +67,7 @@ const STATUS_CODES = { 207: 'Multi-Status', // RFC 4918 208: 'Already Reported', 226: 'IM Used', - 300: 'Multiple Choices', + 300: 'Multiple Choices', // RFC 7231 301: 'Moved Permanently', 302: 'Found', 303: 'See Other', @@ -93,7 +93,7 @@ const STATUS_CODES = { 415: 'Unsupported Media Type', 416: 'Range Not Satisfiable', 417: 'Expectation Failed', - 418: 'I\'m a Teapot', // RFC 2324, 7168 + 418: 'I\'m a Teapot', // RFC 7168 421: 'Misdirected Request', 422: 'Unprocessable Entity', // RFC 4918 423: 'Locked', // RFC 4918