httptoolkit / mockttp

Powerful friendly HTTP mock server & proxy library
https://httptoolkit.com
Apache License 2.0
775 stars 88 forks source link

Fix invalid url escaping - replaced url parsing from url.parse to new… #178

Open dukei opened 1 month ago

dukei commented 1 month ago

This pull requests replaces url handling in request processing.

REASON Some urls can change due to legacy parsing.

For example, parsing the following url https://example.com:8080/validate?param=\\/|+- results in the following: url.parse: https://example.com:8080/validate?param=%5C/%7C+- new URL: https://example.com:8080/validate?param=\\/|+- It can lead to incompatibilities with some sites.

As stated by NodeJS docs url.parse is deprecated due to non-standard parsing and error-prone behavior. URL should be used instead.

CLAassistant commented 1 month ago

CLA assistant check
All committers have signed the CLA.