Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Unmaintained
KDE Libraries
Commits
2dbcc83c
Commit
2dbcc83c
authored
Mar 02, 2014
by
Dawit Alemayehu
Browse files
Send the proper mimetype for empty files (0 bytes).
BUG:323491 FIXED-IN: 4.12.4 REVIEW: 116523
parent
d6453435
Changes
1
Hide whitespace changes
Inline
Side-by-side
kioslave/ftp/ftp.cpp
View file @
2dbcc83c
...
...
@@ -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'
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment