Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Double / when omitting a URL prefix #66

Open
Xboarder56 opened this issue Mar 16, 2022 · 1 comment
Open

Double / when omitting a URL prefix #66

Xboarder56 opened this issue Mar 16, 2022 · 1 comment

Comments

@Xboarder56
Copy link
Contributor

Not sure if you would be opposed to a change request but trying to use this module I ran into an issue with it adding double /'s into the request when omitting a URL prefix (default is append it's own / as well).

self.REST_API = "{}://{}{}/api".format(method, hostname, url_path)

So when making a request with the following it fails:

client = guacapy.Guacamole(hostname="guacamole.example.com", username=BLAH, password=****, method=https)

it would return: https://guacamole.example.com//api/tokens as the reuqest url. I can kinda work around this by making the url_path variable "m" and dropping the m from the hostname but it's a really hacky work around.

I tweaked this in the forked version but wanted some thoughts before submitting the pull request.

@ptr-app
Copy link

ptr-app commented Jul 1, 2024

looks like has been fixed:

self.REST_API = "{}://{}{}api".format(method, hostname, url_path)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants