-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Build the URL using url.JoinPath instead of path.Join (#249)
## Which problem is this PR solving? There is a weird bug in setting a URL path directly, where it will escape some characters, but not all. This [go playground](https://go.dev/play/p/QnMDXnU9lDq) example shows it. The unescaped value is used directly, the escaped value double escapes some of the characters. This PR uses url.PathJoin instead, which is intended to handle URLs. ## Short description of the changes - Update the URL builder to use url.JoinPath and return any errors - Update Transmission to use updated builder func and handle error like before - Update tests to handle errors
- Loading branch information
1 parent
44b3e71
commit 9f4f37c
Showing
2 changed files
with
8 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters