-
Notifications
You must be signed in to change notification settings - Fork 43
Update https.request signature #29
Comments
@meimei13 and I discovered this is causing some pretty nasty bugs. Reproduced these bugs using https://github.com/meimei13/https-reproduction. First, any usage of the
Pull request #30 updates the signature. |
I think it's probably worth moving the @meimei13 is planning on creating a pull request to push these upstream as suggested by the commenting on the patched |
Instead of patching over `https.request()` and `https.get()` manually to add the `secureEndpoint` boolean, utilize the stack trace of the current call logic to determine whether or not the `https.js` core module is invoking `new ClientRequest()`. In theory, this is still fragile logic, but should be more future-proof and cleaner than patching over a core module, which is never really desirable. Fixes #29. Closes #30. Closes #35.
* Remove `https` core module patching logic Instead of patching over `https.request()` and `https.get()` manually to add the `secureEndpoint` boolean, utilize the stack trace of the current call logic to determine whether or not the `https.js` core module is invoking `new ClientRequest()`. In theory, this is still fragile logic, but should be more future-proof and cleaner than patching over a core module, which is never really desirable. Fixes #29. Closes #30. Closes #35. * Remove Node 10-specific test case * Prettier
Tell us about your environment:
In this issue: #24, you updated node-agent-base so that users can still use the 3-argument https.get function specified by the node documentation: https://nodejs.org/api/https.html#https_https_get_url_options_callback.
The node documentation also specifies a 3-argument version of https.request: https://nodejs.org/api/https.html#https_https_request_url_options_callback.
Please apply the same fix to https.request that you applied to https.get.
The text was updated successfully, but these errors were encountered: