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

Problem using SimpleFSResolver when there is a space in file system path #154

Open
hading opened this issue Apr 28, 2015 · 4 comments
Open

Comments

@hading
Copy link
Contributor

hading commented Apr 28, 2015

As near as I can tell this happens because in the _dissect_uri method in webapp.py the identifier is quoted with 'quote_plus', but in the resolver it is unquoted with 'unquote' rather than 'unquote_plus', so instead of looking for 'path/to/my file' it ends up looking for 'path/to/my+file'.

I'm not sure if changing that would impact paths that already have a '+' in them. I'm going to make the change to my fork and do a little more testing.

@jpstroop
Copy link
Member

Thanks for reporting; let me know what you find out. If I understand the problem correctly, are you currenty escaping the space in your identifier, eg., path/to/my file should be path%2Fto%2Fmy%20file?

@hading
Copy link
Contributor Author

hading commented Apr 28, 2015

Yes.

@bptarpley
Copy link

I realize how having spaces in filenames is less than ideal, but we aren't always in control of our customers' file naming habits. Currently, Loris is unable to find files with spaces in the identifier. This is not the case with Cantaloupe. We switched from Cantaloupe to Loris because of Java stability issues in Docker, and haven't looked back. Any chance of revisiting this issue?

@alexwlchan
Copy link
Contributor

alexwlchan commented Dec 21, 2018

I’m going to have a look at this today after Christmas. (Sorry, I’m meant to be on my break, and this is a bigger patch than I originally thought!)

Really the resolvers shouldn’t be doing any URL quoting – that should be handled by the web app and they just get the “pure” identifier.

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

4 participants