diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-10-02 07:54:43 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2010-10-02 07:54:43 +0000 |
| commit | d956ea0b706b075e7f17c07840978e0d1318b5cd (patch) | |
| tree | 6e92015031b9b3f3391baf1d5efca8eb66b2beb4 /src/HttpRequestCommand.cc | |
| parent | 6c348f04936c76a9dfd9d500a6133e2b797e1403 (diff) | |
2010-10-02 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Non-UTF8 filenames are now percent-encoded. For example, filename
for http://example.org/%90%A2%8AE will be %90%A2%8AE because it is
Shift_JIS. The comments and name in .torrent file in XML-RPC
response are percent-encoded if they are not UTF-8.
* src/FtpNegotiationCommand.cc
* src/HttpRequestCommand.cc
* src/HttpResponseCommand.cc
* src/XmlRpcMethodImpl.cc
* src/bittorrent_helper.cc
* src/util.cc
* src/util.h
* test/BittorrentHelperTest.cc
* test/UtilTest.cc
Diffstat (limited to 'src/HttpRequestCommand.cc')
| -rw-r--r-- | src/HttpRequestCommand.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HttpRequestCommand.cc b/src/HttpRequestCommand.cc index 852f6bb1..bc446505 100644 --- a/src/HttpRequestCommand.cc +++ b/src/HttpRequestCommand.cc @@ -159,9 +159,9 @@ bool HttpRequestCommand::executeInternal() { } else { if(getFileEntry()->getPath().empty()) { getFileEntry()->setPath - (util::applyDir + (util::createSafePath (getDownloadContext()->getDir(), - util::fixTaintedBasename(getRequest()->getFile()))); + util::percentDecode(getRequest()->getFile()))); } File ctrlfile(getFileEntry()->getPath()+ DefaultBtProgressInfoFile::getSuffix()); |
