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/HttpResponseCommand.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/HttpResponseCommand.cc')
| -rw-r--r-- | src/HttpResponseCommand.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc index ae741fc3..4c160d0d 100644 --- a/src/HttpResponseCommand.cc +++ b/src/HttpResponseCommand.cc @@ -168,9 +168,8 @@ bool HttpResponseCommand::executeInternal() getFileEntry()->setLength(totalLength); if(getFileEntry()->getPath().empty()) { getFileEntry()->setPath - (util::applyDir - (getDownloadContext()->getDir(), - util::fixTaintedBasename(httpResponse->determinFilename()))); + (util::createSafePath + (getDownloadContext()->getDir(), httpResponse->determinFilename())); } getFileEntry()->setContentType(httpResponse->getContentType()); getRequestGroup()->preDownloadProcessing(); |
