Commit 2dbcc83c authored by Dawit Alemayehu's avatar Dawit Alemayehu
Browse files

Send the proper mimetype for empty files (0 bytes).

BUG:323491
FIXED-IN: 4.12.4
REVIEW: 116523
parent d6453435
......@@ -2564,6 +2564,12 @@ Ftp::StatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const QString &sCop
Ftp::StatusCode Ftp::ftpSendMimeType(int& iError, const KUrl& url)
{
// Emit proper mimetype for zero sized files. #323491
if (m_size == 0) {
mimeType(QLatin1String("application/x-zerosize"));
return statusSuccess;
}
const int totalSize = ((m_size == UnknownSize || m_size > 1024) ? 1024 : m_size);
QByteArray buffer(totalSize, '\0');
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment