Bug 122372 - When saving an image, the suggested filename isn't always right
Summary: When saving an image, the suggested filename isn't always right
Status: RESOLVED WORKSFORME
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR wishlist
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 126078 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-02-20 21:54 UTC by Niels
Modified: 2010-09-06 10:06 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Niels 2006-02-20 21:54:07 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Gentoo Packages

This is apparently related to #46557, and maybe even #23143.

I'm trying to save the image on this page:
http://gallery102249.fotopic.net/p26136236.html

But the suggested filename is index.html. The file _does_ contain the actual jpg image, although Konqueror (browsing the folder) doesn't recognize it as such until I change the extension.

The HTML image tag on the page is:
<img src="http://images2.fotopic.net/?iid=y4js6j&outx=760&quality=70" alt="" class="photo-image">

Firefox (1.5) suggests the filename PICT0051.JPG and so does Opera (8.51).
Comment 1 Mário Srgio Fujikawa Ferreira 2006-05-06 17:49:59 UTC
Probably of duplicate of #126078. kget does not respect Content-Disposition http header.
Comment 2 Urs Wolfer 2006-05-07 00:02:22 UTC
*** Bug 126078 has been marked as a duplicate of this bug. ***
Comment 3 Konrad Rzepecki 2006-06-11 02:41:17 UTC
I think this is KIO FileCopyJob problem, at least in kget situation. This class constructor take dest param witch probably cannot be change.

There are two ways to fix that.

First, fetch real filename before call FileCopyJob (i.e. do HEAD http request). This metchod reqire major changes in all applications causing problems.

The second, write new FileCopyJob2 witch internal make HEAD request and change dest filename to this is set in Content-Disposition header. This can be security hole so KFileDialog can be called from it and user may accept/or not this new name.

The best way will be integration this two classes in one (i.e. FileCopyIn or FileDownload) whitch will be fetch Headers, ask user for local filename and make download.

This second metchod is more complex but also more universal and IMHO better.
Comment 4 Niels 2007-06-07 11:40:47 UTC
Konqueror 3.5.7 on Kubuntu suggests the correct file name. Either the website has changed (doubtfull) or Konqueror has. This bug should probably be closed.
Comment 5 Darin McBride 2008-02-15 00:53:09 UTC
Konqueror seems to be working, but Bug 126078 still exists - can we sever that relationship, closing this one, and reopening that one?
Comment 6 Darin McBride 2008-07-31 20:30:28 UTC
Testing kget directly in kde 4.1, it's even worse now.  I get "invalid directory" (I'm saving to my home directory), and the suggested filename is, well, just my home directory (no file name - just directory name).

Oh, and konqueror is suggesting "index.html" as the file name again.
Comment 7 Niels 2008-08-07 14:20:40 UTC
Konqueror 3.5.9 suggests the correct filename.
Comment 8 FiNeX 2010-09-05 21:13:10 UTC
KDE 4.4.5

- without kget integration: it saves the JPG correctly
- with kget integration: kget asks for save .html (this is a known bug)
Comment 9 Niels 2010-09-06 08:55:37 UTC
Konqueror 3.5.10 gets the file name right, so that's good. However, other links and websites (eg. Demonoid) still cause problems.
Comment 10 FiNeX 2010-09-06 10:06:26 UTC
@Niels: Konqueror 3.5.10 is no more developed and maintained, so if you have found other problems in different websites, please check them with KDE 4 (4.4 o 4.5) and report them on a new bug report.

Thanks for the collaboration! :-)