Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d0d3149

Browse filesBrowse files
dnalborczyktargos
authored andcommitted
http2: add constant to already destructured constants
PR-URL: #28176 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 1b0d67b commit d0d3149
Copy full SHA for d0d3149

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Open diff view settings
Collapse file

‎lib/internal/http2/compat.js‎

Copy file name to clipboardExpand all lines: lib/internal/http2/compat.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@ const { Object, ObjectPrototype, Reflect } = primordials;
44

55
const assert = require('internal/assert');
66
const Stream = require('stream');
7-
const Readable = Stream.Readable;
8-
const binding = internalBinding('http2');
9-
const constants = binding.constants;
7+
const { Readable } = Stream;
8+
const { constants } = internalBinding('http2');
109
const {
1110
codes: {
1211
ERR_HTTP2_HEADERS_SENT,
@@ -38,6 +37,7 @@ const kAborted = Symbol('aborted');
3837

3938
const {
4039
HTTP2_HEADER_AUTHORITY,
40+
HTTP2_HEADER_CONNECTION,
4141
HTTP2_HEADER_METHOD,
4242
HTTP2_HEADER_PATH,
4343
HTTP2_HEADER_SCHEME,
@@ -95,7 +95,7 @@ function statusMessageWarn() {
9595
}
9696

9797
function isConnectionHeaderAllowed(name, value) {
98-
return name !== constants.HTTP2_HEADER_CONNECTION ||
98+
return name !== HTTP2_HEADER_CONNECTION ||
9999
value === 'trailers';
100100
}
101101

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.