mockttp icon indicating copy to clipboard operation
mockttp copied to clipboard

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

Open dukei opened this issue 6 months ago • 1 comments

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.

dukei avatar Aug 20 '24 18:08 dukei