[PATCH] Make the FTP ioslave emit mime-type of the content before actually reading it

Review Request #101149 - Created April 18, 2011 and submitted

Information
Dawit Alemayehu
kdelibs
Reviewers
kdelibs
dfaure
The attached patch changes the ftpGet function such that it emits the mime-type of the content it is about to read, before starting to read it. That way kio_ftp will work correctly if and when it is put on hold to be reused from another application. Note that the patch uses QIODevice::peek to achieve this goal.

  
David Faure
Dawit Alemayehu
David Faure
Dawit Alemayehu
David Faure
Dawit Alemayehu
Dawit Alemayehu
Review request changed

Change Summary:

Fixed one more issue with the patch as pointed out by david...

Diff:

Revision 5 (+52 -15)

Show changes

David Faure
Looks ok now. Let's hope it works, too :-)
  1. In terms of sending the mime-type it definitely works and is an essential part of the fix to make put-ftp-ioslave-on-hold happen. 
    
    However, putting ftp ioslaves on hold still will not work for most use cases because of a decision made in the ftp ioslave. Namely, the implementation of Ftp::copy to speed up the retrieval a resouce from a remote to local resource. I also found out the croner cases where putting slaves on hold fails and why, but I will save those for another discussion I am going to bring up soon.
Commit Hook
This review has been submitted with commit 217836074da0229a561a599c715088c653ea65e7 by Dawit Alemayehu.
Loading...