[kget] [Bug 479357] Downloads don't work

Nicolas Fella bugzilla_noreply at kde.org
Mon Jan 29 20:17:43 GMT 2024


https://bugs.kde.org/show_bug.cgi?id=479357

--- Comment #6 from Nicolas Fella <nicolas.fella at gmx.de> ---
Git commit 153e6359f420bf484d46f73c02a922a2fe32257f by Nicolas Fella.
Committed on 29/01/2024 at 19:58.
Pushed by nicolasfella into branch 'master'.

[workers/http] Read and emit data in chunks

Currently we readAll the whole reply into a QByteArray and pass that to data()

This works fine for small bodies. However when downloading large files (e.g. in
KGet)
this results in the whole file being loaded into RAM. Not only can this fill
all available
RAM, passing this much data via the worker socket also fails.

Instead process the data in chunks.

To facilitate this we need to slightly change the makeRequest interface to
indicate how the
data is to be processed. We have several internal uses cases:

- For requests like GET we want to emit data()
- For some DAV requests like list() we want to process the data outselves
- For some requests like DELETE we don't expect/process any data

Add a DataMode parameter to indicate it.

M  +67   -32   src/kioworkers/http/http.cpp
M  +15   -3    src/kioworkers/http/http.h

https://invent.kde.org/frameworks/kio/-/commit/153e6359f420bf484d46f73c02a922a2fe32257f

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the KGet mailing list