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: docs deprecation of 418 teapot status #14693

Closed
wants to merge 1 commit 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 16 additions & 1 deletion doc/api/deprecations.md
Expand Up @@ -660,6 +660,19 @@ Type: Runtime

`REPLServer.parseREPLKeyword()` was removed from userland visibility.

<a id="DEP00XX"></a>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this and the other instances be replaced?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Value is assigned when PR lands.

#### DEP00XX: HTTP 418 I'm a teapot Status

Type: Documentation-only

The HTTP `418 I'm a teapot` status code was defined in [RFC2324][] as an
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's important to note that 418 is not an HTTP status code, merely an HTCPCP one. I'd just remove the "HTTP" wording.

April Fools joke to illustrate the ways in which the HTTP protocol can be
misused. The status code is not registered in the [IANA HTTP Status Codes][]
registry and *may* be registered in the future for purposes other than those
described in [RFC2324][].

*Note*: This deprecation applies *only* to the use of the `418` status code
to identify the [RFC2324][] defined `I'm a teapot` response semantics.

[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array
Expand Down Expand Up @@ -691,6 +704,7 @@ Type: Runtime
[`os.networkInterfaces`]: os.html#os_os_networkinterfaces
[`os.tmpdir()`]: os.html#os_os_tmpdir
[`punycode`]: punycode.html
[`REPLServer.clearBufferedCommand()`]: repl.html#repl_replserver_clearbufferedcommand
[`require.extensions`]: globals.html#globals_require_extensions
[`tls.CryptoStream`]: tls.html#tls_class_cryptostream
[`tls.SecureContext`]: tls.html#tls_tls_createsecurecontext_options
Expand Down Expand Up @@ -724,4 +738,5 @@ Type: Runtime
[alloc_unsafe_size]: buffer.html#buffer_class_method_buffer_allocunsafe_size
[from_arraybuffer]: buffer.html#buffer_class_method_buffer_from_arraybuffer_byteoffset_length
[from_string_encoding]: buffer.html#buffer_class_method_buffer_from_string_encoding
[`REPLServer.clearBufferedCommand()`]: repl.html#repl_replserver_clearbufferedcommand
[IANA HTTP Status Codes]: https://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml
[RFC2324]: https://www.ietf.org/rfc/rfc2324.txt
2 changes: 1 addition & 1 deletion lib/_http_server.js
Expand Up @@ -77,7 +77,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, Docs-Deprecated DEP00XX
421: 'Misdirected Request',
422: 'Unprocessable Entity', // RFC 4918
423: 'Locked', // RFC 4918
Expand Down
2 changes: 1 addition & 1 deletion src/node_http2.h
Expand Up @@ -167,7 +167,7 @@ HTTP_KNOWN_HEADER_MAX
V(UNSUPPORTED_MEDIA_TYPE, 415) \
V(RANGE_NOT_SATISFIABLE, 416) \
V(EXPECTATION_FAILED, 417) \
V(TEAPOT, 418) \
V(TEAPOT, 418) /** docs deprecated, DEP00XX **/ \
V(MISDIRECTED_REQUEST, 421) \
V(UNPROCESSABLE_ENTITY, 422) \
V(LOCKED, 423) \
Expand Down