[WebKit-devel] wrong file names on download
Dawit A
adawit at kde.org
Mon Feb 15 05:45:34 CET 2010
On Sunday 14 February 2010 06:21:07 Andrea Diamantini wrote:
> Hi all,
> I noticed a strange behaviour of kwebpage::downloadRequest that doesn't
> work properly applied to a php link (a link that doesn't expose directly
> the file to download).
> It actually downloads the right data, but with wrong file name (eg.
> link.php instead of file.pdf).
>
> I'm taking a look at code to understand a bit how to address this problem.
> I'll post a patch here if I'll find a proper solution.
Well it is highly likely your problem is the result of a simple fact that the
current version of KWebPage::downloadRequest does not support the "content-
disposition" header. IOW, it does not bother to use the file name suggested by
the remote server simply because it cannot. A new member function, perhaps
"void downloadReply(QNetworkReply *)", needs to be added to support that
functionality. This is something on my TODO list along with another critical
issue related to downloading of files that require a new API addition to KIO.
Hopefully, I will have the time to start work on the former and continue my
ongoing work on the later this coming week...
More information about the WebKit-devel
mailing list