Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
floredelasteyrie opened this issue Dec 21, 2020 · 3 comments
Open

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

floredelasteyrie opened this issue Dec 21, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@floredelasteyrie
Copy link

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
  • For self._url = "http://example.com/" & uri = "/example/path", the method returns "http://example.com//"
  • For self._url = "http://example.com/" & uri = "example/path", the method returns "http://example.com//example/path"

Is this intended for a particular reason / case ?

@robotdan robotdan added the bug Something isn't working label Dec 21, 2020
@robotdan
Copy link
Member

Seems to be a bug.

mooreds added a commit that referenced this issue May 4, 2022
@mooreds
Copy link
Contributor

mooreds commented May 4, 2022

This should be resolved in #17

@mooreds
Copy link
Contributor

mooreds commented May 6, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants