Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace url.parse with WHATWG URLs #373

Merged
merged 1 commit into from
Jan 20, 2021
Merged

Conversation

willarmiros
Copy link
Contributor

Issue #, if available:
#344

Description of changes:

  • Replace usages of url.parse with new url.URL(), the recommended approach since url.parse is being deprecated.
  • Ensure that we do not crash when patching a request made with a WHATWG URL object by reading its properties correctly and making stripQueryStringFromPath safer.
  • Added unit tests and tested on my sample app.

NOTE: almost all of the diff in http_p.test.js is just whitespace, only the very last test is new with this PR. I had to refactor the testing structure to add a test case for the context-missing logic.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@willarmiros willarmiros merged commit 94a58a9 into aws:master Jan 20, 2021
@willarmiros willarmiros deleted the whatwg branch January 20, 2021 17:25
EkeMinusYou pushed a commit to EkeMinusYou/aws-xray-sdk-node that referenced this pull request Jan 28, 2021
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.

None yet

2 participants