mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
http2: add constant to already destructured constants
PR-URL: https://github.com/nodejs/node/pull/28176 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
This commit is contained in:
1 parent
3a9cb5ccb0
commit
62c8c61e33
1 file changed
+4
-4
@@ -4,9 +4,8 @@ const { Object, ObjectPrototype, Reflect } = primordials;
|
||||
|
||||
const assert = require('internal/assert');
|
||||
const Stream = require('stream');
|
||||
const Readable = Stream.Readable;
|
||||
const binding = internalBinding('http2');
|
||||
const constants = binding.constants;
|
||||
const { Readable } = Stream;
|
||||
const { constants } = internalBinding('http2');
|
||||
const {
|
||||
codes: {
|
||||
ERR_HTTP2_HEADERS_SENT,
|
||||
@@ -38,6 +37,7 @@ const kAborted = Symbol('aborted');
|
||||
|
||||
const {
|
||||
HTTP2_HEADER_AUTHORITY,
|
||||
HTTP2_HEADER_CONNECTION,
|
||||
HTTP2_HEADER_METHOD,
|
||||
HTTP2_HEADER_PATH,
|
||||
HTTP2_HEADER_SCHEME,
|
||||
@@ -95,7 +95,7 @@ function statusMessageWarn() {
|
||||
}
|
||||
|
||||
function isConnectionHeaderAllowed(name, value) {
|
||||
return name !== constants.HTTP2_HEADER_CONNECTION ||
|
||||
return name !== HTTP2_HEADER_CONNECTION ||
|
||||
value === 'trailers';
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user