Closed camlau-pp-dev closed 2 years ago
Previously there was a change to the URI.escape function to utilize CGI.escape as shown in this Pull Request: https://github.com/paypal/paypalhttp_ruby/pull/19.
URI.escape
CGI.escape
There was a breaking case with this change, and this PR serves to resolve this.
https://localhost:3001/
http%3A%2F%2Flocalhost%3A3001%2F
Updated unit tests and added a new one to showcase the passing functionality:
Integration tested this change with the PayPal Checkout-Ruby-SDK with Ruby version 3.0.4 and displayed no failures in unit tests.
This change also reverts the functionality for encoding spaces, as CGI would make " " => "+" while this URI Parser replaces spaces with " " => "%20"
Overview
Previously there was a change to the
URI.escape
function to utilizeCGI.escape
as shown in this Pull Request: https://github.com/paypal/paypalhttp_ruby/pull/19.There was a breaking case with this change, and this PR serves to resolve this.
https://localhost:3001/
were having the special characters be encoded, resulting inhttp%3A%2F%2Flocalhost%3A3001%2F
which is incorrect.This change also reverts the functionality for encoding spaces, as CGI would make " " => "+" while this URI Parser replaces spaces with " " => "%20"
Testing
Updated unit tests and added a new one to showcase the passing functionality:
Integration tested this change with the PayPal Checkout-Ruby-SDK with Ruby version 3.0.4 and displayed no failures in unit tests.