summaryrefslogtreecommitdiff
path: root/src/HttpResponseCommand.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-08-28 12:40:41 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2006-08-28 12:40:41 +0000
commitc096a3a55386d8b801196729a169162bec7f41e1 (patch)
tree3160faca68ebe5d2f8fd5a8e6c98cdbd39e8fc66 /src/HttpResponseCommand.cc
parent531d456950afadc6222b7fa488cc54dc1fb06c81 (diff)
2006-08-28 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
To make filename URL-decoded: * src/HttpResponseCommand.h: Updated doc. * src/HttpResponseCommand.cc (determinFilename): Made filename URL-decoded. * src/FtpInitiateConnectionCommand.cc (executeInternal): Made filename URL-decoded. * src/Util.h (urldecode): New function. * src/Util.cc (urldecode): New function.
Diffstat (limited to 'src/HttpResponseCommand.cc')
-rw-r--r--src/HttpResponseCommand.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/HttpResponseCommand.cc b/src/HttpResponseCommand.cc
index d9f16977..feea4a06 100644
--- a/src/HttpResponseCommand.cc
+++ b/src/HttpResponseCommand.cc
@@ -99,11 +99,11 @@ string HttpResponseCommand::determinFilename(const HttpHeader& headers) {
string contentDisposition =
Util::getContentDispositionFilename(headers.getFirst("Content-Disposition"));
if(contentDisposition.empty()) {
- return req->getFile();
+ return Util::urldecode(req->getFile());
} else {
logger->info("CUID#%d - Content-Disposition Detected. Use %s as filename",
cuid, contentDisposition.c_str());
- return contentDisposition;
+ return Util::urldecode(contentDisposition);
}
}