-
-
Notifications
You must be signed in to change notification settings - Fork 3
fix: add trailing URL slash so we not break query string in the URL #83
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
Conversation
Use urlparse to do it properly. QFieldCloud expects trailing slashes in the resource URLs. We add them in a very naive way now, just checking the string. This causes issues if the URL has querystring, hash or other elements.
|
Hello. I don't sure the trailling slash is deleted in case of url with a parameter. |
|
Would you mind writing code to reproduce the error you are talking about and what are your concerns that this PR will not address them? |
|
This code don't work because the sdk add a '/' t the end of the URL. def download_oldest_file_by_name(self, filename, dest): That raised a 400 error. And the problem also exist when I want to download a media file. |
|
I am not sure if I follow, I am sorry. You have pasted some code which appears to be from some other software. This is fine, I see you are trying to download a specific file version. Assuming you have a global But I don't get if this particular PR works for you or it doesn't? Have you tried it? |
|
Also, we will be happy to receive a PR that adds the |
|
Ok, sorry, I have tested the method add_trailling_slash_to_url, and this is fine. I didn't quite understand the role of the 2 parsing functions. My apologies... |
Use urlparse to do it properly.
QFieldCloud expects trailing slashes in the resource URLs. We add them in a very naive way now, just checking the string. This causes issues if the URL has querystring, hash or other elements.
Supercedes #82 .