BR 79814: KIO bug

Waldo Bastian bastian at kde.org
Sun Aug 1 16:27:25 BST 2004


On Saturday 31 July 2004 19:41, Dawit A. wrote:
> Waldo,
>
> Can please take a look at BR 79813 when you get a chance ? This is a
> problem with a POST request that returns data to be saved into a file. If
> you pick an existing file to save the data into, the file io-slave
> correctly correctly an error (ERR_FILE_ALREADY_EXIST). However, this seems
> to cause the other end (http io-slave) to be disconnected and returned to
> the scheduler there by getting rid of our data. I think we need to do
> something to prevent this in TransferJob::slotFinished. Otherwise, we end
> up doing a new GET which will not work. See the test case provided in
> comment #3 of the bug report.
>
> Could we check what the error message and not disconnect io-slave so we
> won't lose our data ? Would that even work ?


See my comments to the bugreport. Returning ERR_FILE_ALREADY_EXIST in the 
"put" io-slave before doing the first dataReq actually seems to solve the 
problem and in general seems to be the Right Thing To Do (tm).

Cheers,
Waldo

PS: I do wonder what the behavior should be if there is both a partial file 
and the destination file, looking at the code it first seems to ask for 
resumption and then later asks whether to overwrite?? Isn't that a bit too 
much?
-- 
bastian at kde.org  |   KDE Community World Summit 2004  |  bastian at suse.com
bastian at kde.org  | 21-29 August, Ludwigsburg, Germany |  bastian at suse.com




More information about the kde-core-devel mailing list