forked from elastic/apm-agent-nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: instrumentation of
http.request
et al has a few edge cases (el…
…astic#3090) This change updates the argument munging that is done for the wrapping of `http.request` et al to fix some cases where the instrumentation would *change the behaviour* of the function. The main fix here is that before this change the conversion of a URL instance to request options would accidentally drop basic auth info (the 'username' and 'password' fields). This issue has existed since v2.17.0. It was introduced in commit dd60b12 when switching directly from `url.parse()` to `new URL()`. Recent versions of node have a `url.urlToHttpOptions()` to help with this conversion. Fixes: elastic#2044 Fixes: elastic#2382 Refs: https://discuss.elastic.co/t/issue-apm-agent-with-backend-requests-username-password-url/322903
- Loading branch information
Showing
4 changed files
with
259 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.