Bug #2256
closedStrange Filename Leads to 404
Description
I have a filename like this: 林俊杰 - 西界.zip, when I try to do GET with the original filename, it gives me a 400 bad request error. If I try to urlencode it into 26%2326519%3B%26%2320426%3B%26%2326480%3B+-+%26%2335199%3B%26%2330028%3B.zip, it gives me 404. The file does exist in the webroot directory.
Example: http://beta.theonly92.com/林俊杰 - 西界.zip
I'm dead sure the file exists.
Updated by TheOnly92 over 14 years ago
The filename is htmlentity'd 林俊杰 - 西界.zip Here's the true filename.
Updated by bert over 11 years ago
This works just fine for me on current trunk, revision 2903:
sumner: wget -O- "http://192.168.1.5:2000/??? - ??.zip" --2013-09-13 12:11:44-- http://192.168.1.5:2000/%E6%9E%97%E4%BF%8A%E6%9D%B0%20-%20%E8%A5%BF%E7%95%8C.zip Connecting to 192.168.1.5:2000... connected. HTTP request sent, awaiting response... 200 OK Length: 44 [application/zip] Saving to: ‘STDOUT’ 0% [ ] 0 --.-K/s <html> <body> Chinese! </body> </html>
From the access log, showing wget and chrome fetching the same URL:
192.168.1.5 192.168.1.5:2000 - [13/Sep/2013:12:11:44 +0200] "GET /%E6%9E%97%E4%BF%8A%E6%9D%B0%20-%20%E8%A5%BF%E7%95%8C.zip HTTP/1.1" 200 44 "-" "Wget/1.14 (linux-gnu)" 192.168.1.5 192.168.1.5:2000 - [13/Sep/2013:12:12:33 +0200] "GET /%E6%9E%97%E4%BF%8A%E6%9D%B0%20-%20%E8%A5%BF%E7%95%8C.zip HTTP/1.1" 200 44 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.65 Safari/537.36"
Updated by stbuehler over 11 years ago
- Status changed from New to Invalid
Yes.
lighttpd doesn't handle the filename encoding (utf8, iso-8859-1, ...); it is your job to build the correct byte string with url encoding.
Also available in: Atom