k_35 Posted October 17, 2013 Report Share Posted October 17, 2013 I create a torrent: /testvideo//testvideo/1.mkv/testvideo/中文.mkv/testvideo/中文 空格.mkv/testvideo/中文+空格.mkvI input in "Web Seeds"http://192.168.0.222/test/video/Apache log: (uTorrent 3.4 & 3.32) 192.168.0.222 - - [17/Oct/2013:16:06:02 +0800] "GET /test/video/testvideo/\xd6\xd0\xce\xc4%20\xbf\xd5\xb8\xf1.mkv HTTP/1.1" 403 236192.168.0.222 - - [17/Oct/2013:16:06:02 +0800] "GET /test/video/testvideo/\xd6\xd0\xce\xc4+\xbf\xd5\xb8\xf1.mkv HTTP/1.1" 403 236192.168.0.222 - - [17/Oct/2013:16:06:02 +0800] "GET /test/video/testvideo/\xd6\xd0\xce\xc4+\xbf\xd5\xb8\xf1.mkv HTTP/1.1" 403 236192.168.0.222 - - [17/Oct/2013:16:09:22 +0800] "GET /test/video/testvideo/\xd6\xd0\xce\xc4%20\xbf\xd5\xb8\xf1.mkv HTTP/1.1" 403 236192.168.0.222 - - [17/Oct/2013:16:09:22 +0800] "GET /test/video/testvideo/\xd6\xd0\xce\xc4.mkv HTTP/1.1" 403 231192.168.0.222 - - [17/Oct/2013:16:09:22 +0800] "GET /test/video/testvideo/1.mkv HTTP/1.1" 206 166350What's the encoding of the filename? Why not utf8 url encoding ? Link to comment Share on other sites More sharing options...
k_35 Posted October 17, 2013 Author Report Share Posted October 17, 2013 uTorrent 3.4 After restart uTorrent, "Web Seeds" will be empty . Link to comment Share on other sites More sharing options...
ciaobaby Posted October 17, 2013 Report Share Posted October 17, 2013 "GET /test/video/testvideo/\xd6\xd0\xce\xc4%20\xbf\xd5\xb8\xf1.mkv HTTP/1.1" 403 23A HTTP 403 response means Permission Denied so why should it keep trying to access data that IS inaccessible?Fix that before reporting it as a 'bug'. Link to comment Share on other sites More sharing options...
k_35 Posted October 18, 2013 Author Report Share Posted October 18, 2013 "GET /test/video/testvideo/\xd6\xd0\xce\xc4%20\xbf\xd5\xb8\xf1.mkv HTTP/1.1" 403 23A HTTP 403 response means Permission Denied so why should it keep trying to access data that IS inaccessible?Fix that before reporting it as a 'bug'.Apache return 403 Because uTorrent send WRONG ENCODING. Link to comment Share on other sites More sharing options...
ciaobaby Posted October 18, 2013 Report Share Posted October 18, 2013 Sure it is not because you have a space (%20) in a URI that shouldn't have a space in it? Link to comment Share on other sites More sharing options...
k_35 Posted October 19, 2013 Author Report Share Posted October 19, 2013 Sure it is not because you have a space (%20) in a URI that shouldn't have a space in it?Other character should be like "%E4%B8%AD%E6%96%87",just like space to be converted to "%20",But uTorrent send "\xd6\xd0\xce\xc4", this is not url encoding. Link to comment Share on other sites More sharing options...
ciaobaby Posted October 19, 2013 Report Share Posted October 19, 2013 It's 16 bit unicode, if you want it to be URL encoded as UTF-8 then create the URL path using an EIGHT BIT character set not a 16bit set. Link to comment Share on other sites More sharing options...
k_35 Posted October 20, 2013 Author Report Share Posted October 20, 2013 It's 16 bit unicode, if you want it to be URL encoded as UTF-8 then create the URL path using an EIGHT BIT character set not a 16bit set.The filename in URL path is created by uTorrent. Link to comment Share on other sites More sharing options...
ciaobaby Posted October 20, 2013 Report Share Posted October 20, 2013 The filename in URL path is created by uTorrent.Nope, the filename is the filename on YOUR computer. Link to comment Share on other sites More sharing options...
k_35 Posted October 20, 2013 Author Report Share Posted October 20, 2013 The filename in URL path is created by uTorrent.Nope' date=' the filename is the filename on [b']YOUR computer.Of course not. The filename is utf8 encoding in the .torrent file.It should be converted to url encoding when utorrent send to apache. Link to comment Share on other sites More sharing options...
ciaobaby Posted October 20, 2013 Report Share Posted October 20, 2013 The filename is utf8 encoding in the .torrent file.But the 'name' in the metadata data comes DIRECTLY FROM the filename on the drive you have the payload on. Link to comment Share on other sites More sharing options...
k_35 Posted October 20, 2013 Author Report Share Posted October 20, 2013 The filename is utf8 encoding in the .torrent file.But the 'name' in the metadata data comes DIRECTLY FROM the filename on the drive you have the payload on.Yes, It's right.But utorrent shouldn't directly use the filename on the drive.The filename should be url encoding when utorrent send to the webserver . Link to comment Share on other sites More sharing options...
k_35 Posted October 21, 2013 Author Report Share Posted October 21, 2013 Apache does not support multibytes characters encoded as "\xd6\xd0\xce\xc4",URL encoded as UTF-8 ("%E4%B8%AD%E6%96%87") works fine.Please fix this problem. Link to comment Share on other sites More sharing options...
k_35 Posted October 21, 2013 Author Report Share Posted October 21, 2013 I create another torrent for test.The directory is "测试视频", 4 multibytes chinese characters.The filename is "中文.mkv", 2 multibytes chinese characters with extension .mkv.Apache log: "\xe6\xb5\x8b\xe8\xaf\x95\xe8\xa7\x86\xe9\xa2\x91/\xd6\xd0\xce\xc4.mkv"The directory is "\xe6\xb5\x8b\xe8\xaf\x95\xe8\xa7\x86\xe9\xa2\x91", 12 hex charsThe filename is \xd6\xd0\xce\xc4 , 4 hex chars.So. the root directory is utf8 encoding, every multibytes has 3 bytes,other files in the directory is GBK encoding, every multibytes has 2bytes.It's very wrong. Link to comment Share on other sites More sharing options...
k_35 Posted October 21, 2013 Author Report Share Posted October 21, 2013 I see. I changed the filename in url, apache return 200 now."GET /test/video/testvideo/\xe4\xb8\xad\xe6\x96\x87.mkv HTTP/1.0" 200 so the reason is the file's encoding which sent by utorrent is wrong.The directory's encoding is right. Link to comment Share on other sites More sharing options...
k_35 Posted November 23, 2013 Author Report Share Posted November 23, 2013 Please fix encoding bug, thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.