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

Issue with last dot happening before last slash #46

Open
dlvx opened this issue Dec 13, 2017 · 0 comments
Open

Issue with last dot happening before last slash #46

dlvx opened this issue Dec 13, 2017 · 0 comments

Comments

@dlvx
Copy link

dlvx commented Dec 13, 2017

Hello, I am affraid the commit 7af0bc7 has brought an unexpected issue. Let me explain:

I am doing a call to an API with an URL of the form:

/apis/core.py/endpoint

I am using a proxy to target this call to another server.
Before the changes from 7af0bc7 everything was working properly cause no rewrite was being applied to the url, and the proxy worked as expected.

Now, this type of url doesn't meet the following validation due to the last dot happening before the last slash:
pathname.lastIndexOf('.') > pathname.lastIndexOf('/')

After this addition, my call to the API fails.
If I revert the code to how it was everything works OK.

I think maybe there could be a better approach to this?
Cheers!

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

No branches or pull requests

1 participant