Skip to content

Commit 9594b54

Browse files
Voltrarickyes
authored andcommitted
http: add RFC references for each status code
Reference format: `RFC <rfc id> <section path>` PR-URL: #33671 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Pranshu Srivastava <rexagod@gmail.com> Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
1 parent 8da8ec9 commit 9594b54

1 file changed

Lines changed: 62 additions & 62 deletions

File tree

lib/_http_server.js

Lines changed: 62 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -83,69 +83,69 @@ const kServerResponse = Symbol('ServerResponse');
8383
const kServerResponseStatistics = Symbol('ServerResponseStatistics');
8484

8585
const STATUS_CODES = {
86-
100: 'Continue',
87-
101: 'Switching Protocols',
88-
102: 'Processing', // RFC 2518, obsoleted by RFC 4918
89-
103: 'Early Hints',
90-
200: 'OK',
91-
201: 'Created',
92-
202: 'Accepted',
93-
203: 'Non-Authoritative Information',
94-
204: 'No Content',
95-
205: 'Reset Content',
96-
206: 'Partial Content',
97-
207: 'Multi-Status', // RFC 4918
98-
208: 'Already Reported',
99-
226: 'IM Used',
100-
300: 'Multiple Choices', // RFC 7231
101-
301: 'Moved Permanently',
102-
302: 'Found',
103-
303: 'See Other',
104-
304: 'Not Modified',
105-
305: 'Use Proxy',
106-
307: 'Temporary Redirect',
107-
308: 'Permanent Redirect', // RFC 7238
108-
400: 'Bad Request',
109-
401: 'Unauthorized',
110-
402: 'Payment Required',
111-
403: 'Forbidden',
112-
404: 'Not Found',
113-
405: 'Method Not Allowed',
114-
406: 'Not Acceptable',
115-
407: 'Proxy Authentication Required',
116-
408: 'Request Timeout',
117-
409: 'Conflict',
118-
410: 'Gone',
119-
411: 'Length Required',
120-
412: 'Precondition Failed',
121-
413: 'Payload Too Large',
122-
414: 'URI Too Long',
123-
415: 'Unsupported Media Type',
124-
416: 'Range Not Satisfiable',
125-
417: 'Expectation Failed',
126-
418: 'I\'m a Teapot', // RFC 7168
127-
421: 'Misdirected Request',
128-
422: 'Unprocessable Entity', // RFC 4918
129-
423: 'Locked', // RFC 4918
130-
424: 'Failed Dependency', // RFC 4918
131-
425: 'Too Early', // RFC 8470
132-
426: 'Upgrade Required', // RFC 2817
133-
428: 'Precondition Required', // RFC 6585
134-
429: 'Too Many Requests', // RFC 6585
135-
431: 'Request Header Fields Too Large', // RFC 6585
136-
451: 'Unavailable For Legal Reasons',
137-
500: 'Internal Server Error',
138-
501: 'Not Implemented',
139-
502: 'Bad Gateway',
140-
503: 'Service Unavailable',
141-
504: 'Gateway Timeout',
142-
505: 'HTTP Version Not Supported',
143-
506: 'Variant Also Negotiates', // RFC 2295
144-
507: 'Insufficient Storage', // RFC 4918
145-
508: 'Loop Detected',
86+
100: 'Continue', // RFC 7231 6.2.1
87+
101: 'Switching Protocols', // RFC 7231 6.2.2
88+
102: 'Processing', // RFC 2518 10.1 (obsoleted by RFC 4918)
89+
103: 'Early Hints', // RFC 8297 2
90+
200: 'OK', // RFC 7231 6.3.1
91+
201: 'Created', // RFC 7231 6.3.2
92+
202: 'Accepted', // RFC 7231 6.3.3
93+
203: 'Non-Authoritative Information', // RFC 7231 6.3.4
94+
204: 'No Content', // RFC 7231 6.3.5
95+
205: 'Reset Content', // RFC 7231 6.3.6
96+
206: 'Partial Content', // RFC 7233 4.1
97+
207: 'Multi-Status', // RFC 4918 11.1
98+
208: 'Already Reported', // RFC 5842 7.1
99+
226: 'IM Used', // RFC 3229 10.4.1
100+
300: 'Multiple Choices', // RFC 7231 6.4.1
101+
301: 'Moved Permanently', // RFC 7231 6.4.2
102+
302: 'Found', // RFC 7231 6.4.3
103+
303: 'See Other', // RFC 7231 6.4.4
104+
304: 'Not Modified', // RFC 7232 4.1
105+
305: 'Use Proxy', // RFC 7231 6.4.5
106+
307: 'Temporary Redirect', // RFC 7231 6.4.7
107+
308: 'Permanent Redirect', // RFC 7238 3
108+
400: 'Bad Request', // RFC 7231 6.5.1
109+
401: 'Unauthorized', // RFC 7235 3.1
110+
402: 'Payment Required', // RFC 7231 6.5.2
111+
403: 'Forbidden', // RFC 7231 6.5.3
112+
404: 'Not Found', // RFC 7231 6.5.4
113+
405: 'Method Not Allowed', // RFC 7231 6.5.5
114+
406: 'Not Acceptable', // RFC 7231 6.5.6
115+
407: 'Proxy Authentication Required', // RFC 7235 3.2
116+
408: 'Request Timeout', // RFC 7231 6.5.7
117+
409: 'Conflict', // RFC 7231 6.5.8
118+
410: 'Gone', // RFC 7231 6.5.9
119+
411: 'Length Required', // RFC 7231 6.5.10
120+
412: 'Precondition Failed', // RFC 7232 4.2
121+
413: 'Payload Too Large', // RFC 7231 6.5.11
122+
414: 'URI Too Long', // RFC 7231 6.5.12
123+
415: 'Unsupported Media Type', // RFC 7231 6.5.13
124+
416: 'Range Not Satisfiable', // RFC 7233 4.4
125+
417: 'Expectation Failed', // RFC 7231 6.5.14
126+
418: 'I\'m a Teapot', // RFC 7168 2.3.3
127+
421: 'Misdirected Request', // RFC 7540 9.1.2
128+
422: 'Unprocessable Entity', // RFC 4918 11.2
129+
423: 'Locked', // RFC 4918 11.3
130+
424: 'Failed Dependency', // RFC 4918 11.4
131+
425: 'Too Early', // RFC 8470 5.2
132+
426: 'Upgrade Required', // RFC 2817 and RFC 7231 6.5.15
133+
428: 'Precondition Required', // RFC 6585 3
134+
429: 'Too Many Requests', // RFC 6585 4
135+
431: 'Request Header Fields Too Large', // RFC 6585 5
136+
451: 'Unavailable For Legal Reasons', // RFC 7725 3
137+
500: 'Internal Server Error', // RFC 7231 6.6.1
138+
501: 'Not Implemented', // RFC 7231 6.6.2
139+
502: 'Bad Gateway', // RFC 7231 6.6.3
140+
503: 'Service Unavailable', // RFC 7231 6.6.4
141+
504: 'Gateway Timeout', // RFC 7231 6.6.5
142+
505: 'HTTP Version Not Supported', // RFC 7231 6.6.6
143+
506: 'Variant Also Negotiates', // RFC 2295 8.1
144+
507: 'Insufficient Storage', // RFC 4918 11.5
145+
508: 'Loop Detected', // RFC 5842 7.2
146146
509: 'Bandwidth Limit Exceeded',
147-
510: 'Not Extended', // RFC 2774
148-
511: 'Network Authentication Required' // RFC 6585
147+
510: 'Not Extended', // RFC 2774 7
148+
511: 'Network Authentication Required' // RFC 6585 6
149149
};
150150

151151
const kOnExecute = HTTPParser.kOnExecute | 0;

0 commit comments

Comments
 (0)