Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: percent encode plus signs in path components (#223)
While testing encoding behavior across the SDKs I found a failure to encode this path: `"&$+,:;=?@#.jpg"`. Prior to this PR our encoding step didn't replace plus signs (+). Now we replace plus signs with `%2B`. To see that the original encoding step fails, replace the domain of this URL `'https://test.imgix.net/&$+,%3A;=%3F@%23.jpg'` to see that it 404s. Likewise, you can replace the domain of the this correctly encoded URL: `'https://test.imgix.net/&$%2B,%3A;=%3F@%23.jpg'` to see that it 200s (and the image is displayed). For reference see [RF3986 - Appendix B](https://tools.ietf.org/html/rfc3986#appendix-B).
- Loading branch information