diff options
| author | Shane Kearns <shane.kearns@accenture.com> | 2011-10-18 15:18:06 (GMT) | 
|---|---|---|
| committer | Shane Kearns <shane.kearns@accenture.com> | 2011-10-18 16:32:48 (GMT) | 
| commit | 72bf6105214bfc26cff33632f7f4bdeed9cdf362 (patch) | |
| tree | 6b44674879d9a30a81a50f1c9dad6ba4ed64a5a6 /doc/src/snippets/code/doc_src_qt4-sql.cpp | |
| parent | c9ae5814eb40acdb683004277573a09c6b78aba9 (diff) | |
| download | Qt-72bf6105214bfc26cff33632f7f4bdeed9cdf362.zip Qt-72bf6105214bfc26cff33632f7f4bdeed9cdf362.tar.gz Qt-72bf6105214bfc26cff33632f7f4bdeed9cdf362.tar.bz2 | |
FTP - fix interoperability issues with SIZE command
Certain FTP servers refuse the SIZE command in ASCII mode (proftpd)
or refuse the SIZE command in ASCII mode for large files.
This is a security feature, as the SIZE command requires reading
the whole file and counting line ends which can cause denial of
services. In binary mode, the file size on disc is reported, which
is a relatively quick operation.
Qt had two problems here:
1. when size command fails, the total size was reported as -1,
   whereas the documentation of QFtp::dataTransferProgress states
   it should be reported as 0 (so that QProgressDialog can display
   a wait note rather than progress bar)
2. SIZE command was sent before setting the type of the transfer
   to ASCII / Binary. This is a problem as the size reported by
   the server is incorrect. Also it usually means sending ASCII
   SIZE for Binary transfers, which results in the 550 error on
   FTP servers with DOS protection.
Task-Number: QTTH-1428
Reviewed-By: Peter Hartmann
Diffstat (limited to 'doc/src/snippets/code/doc_src_qt4-sql.cpp')
0 files changed, 0 insertions, 0 deletions
