-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
http2: add constant to already destructured constants #28176
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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; | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thing is that |
||||||
const { constants } = internalBinding('http2'); | ||||||
BridgeAR marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
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'; | ||||||
} | ||||||
|
||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.