mirror of
https://github.com/tubearchivist/tubearchivist-jf-plugin.git
synced 2026-03-23 20:37:14 +00:00
[GH-ISSUE #4] Handle trailing / in URL #2
Labels
No labels
bug
enhancement
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
tubearchivist/archived-tubearchivist-jf-plugin#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @p-rintz on GitHub (Apr 22, 2024).
Original GitHub issue: https://github.com/tubearchivist/tubearchivist-jf-plugin/issues/4
Originally assigned to: @DarkFighterLuke on GitHub.
This is kind of related to #3 , but the Plugin does not handle having a trailing / at the end of the Tubearchivist URL.
This leads to errors and the plugin silently failing (hence the relation to #3 )
I have no preference how this gets handled.
Could be a notice to not include it, handling it in code or throwing an error.
@ThisIsHetz commented on GitHub (Apr 23, 2024):
Prefacing this with my usual disclaimer of "I'm not a dev", PluginConfiguration.cs calls to Utils.cs for
SanitizeUrl()to sanitize the value provided for_tubeArchivistUrl(the variable for the field where your TA URL goes in the plugin form):Assuming I understand all of the above correctly,
SanitizeUrl()explicitly adds a trailing forward slash in the event one isn't included. It actually removes all trailing forward slashes, if any are included, before appending just one; akin to acleanedPath = cleanedPath.rstrip('/') + "/"in Python.That the plugin actually forces a trailing slash, in combination with a "works on my machine" (I included a slash, when configuring the plugin, without issue), makes me wonder if this could be a symptom of another issue.
@p-rintz commented on GitHub (Apr 23, 2024):
Hm. Not entirely sure. The issue showed itself on my side as permission denied errors or the like, and the only thing I changed, before it started working, was the trailing slash in the plugin config, so I assumed that it was that.
Not sure what else it would be.
@DarkFighterLuke commented on GitHub (Apr 24, 2024):
Hi @p-rintz , I have just tested it (again) on my machine and it works, so the problem is not here.
Maybe you should include your logs, thanks.
@p-rintz commented on GitHub (Apr 24, 2024):
If you cant reproduce it on your side, Ill just close this issue for now and reopen a new one if I can find out what else it was that made it not work. Thanks for your help.