Skip to content

Double / when omitting a URL prefix #66

Description

@Xboarder56

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions