Skip to content

Conversation

@fengmk2
Copy link
Member

@fengmk2 fengmk2 commented Feb 27, 2018

@fengmk2
Copy link
Member Author

fengmk2 commented Feb 27, 2018

依赖 node-modules/agentkeepalive#59

lib/urllib.js Outdated
if (agent && agent.keepAlive && agent.freeSocketKeepAliveTimeout > 0 &&
res.headers.connection === 'keep-alive' && res.headers['keep-alive']) {
// adjust freeSocketKeepAliveTimeout on the socket
var m = KEEP_ALIVE_RE.exec(res.headers['keep-alive']);
Copy link
Contributor

Choose a reason for hiding this comment

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

exec 后没 reset ?

Copy link
Member Author

Choose a reason for hiding this comment

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

为何需要 reset?又不是 g 模式

Copy link
Member Author

Choose a reason for hiding this comment

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

image

实际测试是不需要的,index 不会变化

Copy link
Contributor

Choose a reason for hiding this comment

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

恩,global 模式才需要,2 了

- node_js: '0.10'
env: AGENT_VERSION=3
- node_js: '0.12'
env: AGENT_VERSION=3
Copy link
Member Author

Choose a reason for hiding this comment

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

感谢 @popomore 的方式,可以分版本测试了。

@fengmk2 fengmk2 merged commit d6e7c58 into master Feb 28, 2018
@fengmk2 fengmk2 deleted the support-keep-alive-header branch February 28, 2018 05:31
@fengmk2
Copy link
Member Author

fengmk2 commented Feb 28, 2018

2.26.0

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.

4 participants