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

404 not found on download of file ending with ? question mark in the filename. #438

Open
bateast opened this issue Apr 14, 2021 · 0 comments

Comments

@bateast
Copy link

bateast commented Apr 14, 2021

Bug report

Describe the bug

Access to (and so streaming of) files (vfs urls) ending with question mark in the filename produces 404 not found error page. (? is actually after the name part, before the extension, xxxxx?.flac)

Expected Behavior

Chorus should provide working download links to any file, whatever unicode character is used (if supported by underlying filesystem) wherever it is in the filename.

Actual Behavior

Download (and streaming) of files not ending with ? is working.

To Reproduce

  1. Search for '?' in the chorus search box
  2. Elect any Songs ending with ? (beware, what is important is filename, which may differ from titlename displayed in Chorus, if filename does not end with xxx?.flac or xxx?.mp3 and had been stripped from its ?, it would actually work)
  3. Select […] Download
  4. here you get 404 Not found.

Debuglog

Files.GetDirectory [{"jsonrpc":"2.0","method":"Files.GetDirectory","params":["/media/Home/Bat/Musique/Arctic Monkeys/AM/"],"id":542}]

[{"id":542,"jsonrpc":"2.0","result":{"files":[{"file":"/media/Home/Bat/Musique/Arctic Monkeys/AM/01 Do I Wanna Know?.flac","filetype":"file","label":"01 Do I Wanna Know?.flac","type":"unknown"},{"file":"/media/Home/Bat/Musique/Arctic Monkeys/AM/02 R U Mine?.flac","filetype":"file","label":"02 R U Mine?.flac","type":"unknown"},{"file":"/media/Home/Bat/Musique/Arctic Monkeys/AM/03 One for the Road.flac","filetype":"file","label":"03 One for the Road.flac","type":"unknown"},…],"limits":{"end":12,"start":0,"total":12}}}]

Files.PrepareDownload [{"jsonrpc":"2.0","method":"Files.PrepareDownload","params":["/media/Home/Bat/Musique/Arctic Monkeys/AM/01 Do I Wanna Know?.flac"],"id":600}]

[{"id":600,"jsonrpc":"2.0","result":{"details":{"path":"vfs/%2fmedia%2fHome%2fBat%2fMusique%2fArctic%20Monkeys%2fAM%2f01%20Do%20I%20Wanna%20Know%3f.flac"},"mode":"redirect","protocol":"http"}}]

GET http://192.168.2.2/vfs/%2fmedia%2fHome%2fBat%2fMusique%2fArctic%20Monkeys%2fAM%2f01%20Do%20I%20Wanna%20Know%3f.flac

Code 404 <html><head><title>File not found</title></head><body>File not found</body></html>

Remark
GET http://192.168.2.2/vfs/%2fmedia%2fHome%2fBat%2fMusique%2fArctic%20Monkeys%2fAM%2f03%20One%20for%20the%20Road.flac

Code 202 Song playing in browser

Your Environment

Chorus version 18.x-2.4.6
Kodi version 18.9
Remote control Remote control is set up correctly
Local audio HTML 5

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

No branches or pull requests

2 participants