Skip to content

fix: skip specified Node.js version to set keep-alive #4527

Closed
rickyes wants to merge 1 commit intoeggjs:masterfrom
rickyes:skip-specified-version-of-keep-alive
Closed

fix: skip specified Node.js version to set keep-alive #4527
rickyes wants to merge 1 commit intoeggjs:masterfrom
rickyes:skip-specified-version-of-keep-alive

Conversation

@rickyes
Copy link
Copy Markdown

@rickyes rickyes commented Nov 27, 2020

Checklist
  • npm test passes
  • commit message follows commit guidelines
Affected core subsystem(s)
Description of change

Related-issues have been fixed and released in Node.js v14.12.0 and v12.20.0

Refs: nodejs/node#34561 nodejs/node#35138

Comment thread app/middleware/meta.js
Comment thread app/middleware/meta.js
// Node.js >= 14.8.0 && < 14.12.0 and = 12.19.0 will set Keep-Alive Header
// Refs: https://github.com/nodejs/node/pull/34561 https://github.com/nodejs/node/pull/35138

const shouldPatchKeepAliveHeader = !semver.satisfies(process.version, '>=14.8.0 <14.12.0 || =12.19.0');
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这逻辑有问题吧,在 14.12.0 之上的版本,都不应该 patch 了,交给 Node 本身来 patch

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我看错了,close

@rickyes rickyes closed this Nov 27, 2020
@rickyes rickyes deleted the skip-specified-version-of-keep-alive branch November 27, 2020 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants