Skip to content

http: validate timeout in ClientRequest()#26214

Merged
cjihrig merged 1 commit into
nodejs:masterfrom
cjihrig:26143
Feb 26, 2019
Merged

http: validate timeout in ClientRequest()#26214
cjihrig merged 1 commit into
nodejs:masterfrom
cjihrig:26143

Conversation

@cjihrig

@cjihrig cjihrig commented Feb 20, 2019

Copy link
Copy Markdown
Contributor

Validate the timeout option in the ClientRequest() constructor to prevent asynchronously thrown validation errors.

Fixes: #26143

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the http Issues or PRs related to the http subsystem. label Feb 20, 2019
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@BridgeAR BridgeAR left a comment

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.

Definitely +1 on the behavior change but the error message seems like it could use a better description as there's no 'msecs' argument in the request. Adding a optional second argument to the validateTimerDuration to replace msecs with timeout would already be better (even though it's still not an argument).

@lpinca lpinca added the semver-major PRs that contain breaking changes and should be released in the next major version. label Feb 20, 2019
@cjihrig cjihrig added the blocked PRs that are blocked by other issues or PRs. label Feb 21, 2019
@cjihrig cjihrig removed the blocked PRs that are blocked by other issues or PRs. label Feb 23, 2019
@cjihrig

cjihrig commented Feb 26, 2019

Copy link
Copy Markdown
Contributor Author

@cjihrig

cjihrig commented Feb 26, 2019

Copy link
Copy Markdown
Contributor Author

@nodejs/tsc this needs at least two reviews since it's semver major (James' review doesn't currently count toward that).

Validate the timeout option in the ClientRequest() constructor
to prevent asynchronously thrown validation errors.

PR-URL: nodejs#26214
Fixes: nodejs#26143
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Wyatt Preul <[email protected]>
Reviewed-By: Ali Ijaz Sheikh <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
@cjihrig

cjihrig commented Feb 26, 2019

Copy link
Copy Markdown
Contributor Author

Thanks for the reviews! Landed in 907941d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

http Issues or PRs related to the http subsystem. semver-major PRs that contain breaking changes and should be released in the next major version.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants