Skip to content

Commit

Permalink
tests, http: fixed call to ERR_HTTP_INCOMING_SOCKET_ENCODING
Browse files Browse the repository at this point in the history
internal/errors declaration updated to match new scheme

PR-URL: nodejs#19344

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 f3c429c commit 3613e8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion lib/_http_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const {
const { IncomingMessage } = require('_http_incoming');
const {
ERR_HTTP_HEADERS_SENT,
ERR_HTTP_INCOMING_SOCKET_ENCODING,
ERR_HTTP_INVALID_STATUS_CODE,
ERR_INVALID_CHAR
} = require('internal/errors').codes;
Expand Down Expand Up @@ -685,7 +686,7 @@ function onSocketPause() {
}

function socketSetEncoding() {
throw new errors.Error('ERR_HTTP_INCOMING_SOCKET_ENCODING', 'setEncoding');
throw new ERR_HTTP_INCOMING_SOCKET_ENCODING('setEncoding');
}

function unconsume(parser, socket) {
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',
'Changing the incoming socket encoding is not possible (see RFC7230 Section 3)',
'Changing the incoming socket encoding is not possible (RFC7230 Section 3)',
Error);
E('ERR_HTTP_INVALID_HEADER_VALUE',
'Invalid value "%s" for header "%s"', TypeError);
Expand Down

0 comments on commit 3613e8d

Please sign in to comment.