FusionAuth / fusionauth-python-client

FusionAuth Python Client
https://fusionauth.io
Apache License 2.0
24 stars 12 forks source link

Uri not working for urls ending with a backslash ? #12

Open floredelasteyrie opened 3 years ago

floredelasteyrie commented 3 years ago

Hi ! Trying to use the uri method, it seems to have some odd behavior when the url ends with a backslash. The method (link to code):

    def uri(self, uri):
        if self._url is None:
            return self
        if self._url.endswith('/') and uri.startswith('/'):
            self._url += uri[:1]
        elif self._url.endswith('/') and not uri.startswith('/'):
            self._url += "/" + uri
        else:
            self._url += uri
        return self

Is this intended for a particular reason / case ?

robotdan commented 3 years ago

Seems to be a bug.

mooreds commented 2 years ago

This should be resolved in https://github.com/FusionAuth/fusionauth-python-client/pull/17

mooreds commented 2 years ago

Merged #17 , this will be released the next time the python client library is released (the next major FusionAuth release).