Skip to content

Commit

Permalink
docs, errors: note RFC compliance in error message and documentation
Browse files Browse the repository at this point in the history
added note and link to RFC7230

>A recipient MUST parse an HTTP message as a sequence of octets in an
encoding that is a superset of US-ASCII [USASCII].

Ref: https://tools.ietf.org/html/rfc7230#section-3

Ref: nodejs#18118
Ref: nodejs#18178
Ref: nodejs#19344
  • Loading branch information
iSkore committed Apr 3, 2018
1 parent 4643c63 commit f3c429c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/api/errors.md
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ An attempt was made to add more headers after the headers had already been sent.
### ERR_HTTP_INCOMING_SOCKET_ENCODING

An attempt was made to manipulate the encoding of an incoming request packet.
This is not allowed (RFC2616).
This is forbidden by [RFC7230 Section 3](https://tools.ietf.org/html/rfc7230#section-3)

<a id="ERR_HTTP_INVALID_HEADER_VALUE"></a>
### ERR_HTTP_INVALID_HEADER_VALUE
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ E('ERR_HTTP2_UNSUPPORTED_PROTOCOL', 'protocol "%s" is unsupported.', Error);
E('ERR_HTTP_HEADERS_SENT',
'Cannot %s headers after they are sent to the client', Error);
E('ERR_HTTP_INCOMING_SOCKET_ENCODING',
'Incoming socket encoding is not allowed (RFC 2616)',
'Changing the incoming socket encoding is not possible (see RFC7230 Section 3)',
Error);
E('ERR_HTTP_INVALID_HEADER_VALUE',
'Invalid value "%s" for header "%s"', TypeError);
Expand Down

0 comments on commit f3c429c

Please sign in to comment.