"Save Image As" Suggests Wrong Filename/MIME Type with Redirect

Bug #207670 reported by Ben
8
Affects Status Importance Assigned to Milestone
firefox-3.0 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: firefox-3.0

(I wasn't sure which of the myriad of Firefox packages to file this against. I'm running Firefox 3, beta 4 in Hardy).

Description
=======
If I follow a link which redirects to an image file (i.e. a document with an image/* MIME type) then right click on the image and choose "Save Image As" the resulting dialog box suggests a filename for said image based on the referring URLs path and MIME type.

How to Reproduce
=============

For example, and apologies in advance, visit http://fotos.nazjam.com/wp-content/uploads/2008/03/imagem220.jpg and right click "Save Image As". You should be prompted to save it as "imagem220.jpg", which makes perfect sense. However, visit http://reddit.com/goto?rss=true&id=t3_6dfq9 , which redirects to the former URL, and repeat this process. This time the suggested filename is "goto.html". This is problematic for two reasons: (a) the filename doesn't make sense, (b) the MIME type is butchered. The result is that the user has a file on disk named "goto.html" which is associated with Firefox, but when opened displays the binary data of the JPEG.

 ben@dev:~$ wget "http://reddit.com/goto?rss=true&id=t3_6dfq9"
 --10:41:15-- http://reddit.com/goto?rss=true&id=t3_6dfq9
            => `goto?rss=true&id=t3_6dfq9'
 Resolving reddit.com... 208.96.53.70
 Connecting to reddit.com|208.96.53.70|:80... connected.
 HTTP request sent, awaiting response... 302 Found
 Location: http://fotos.nazjam.com/wp-content/uploads/2008/03/imagem220.jpg [following]
 --10:41:16-- http://fotos.nazjam.com/wp-content/uploads/2008/03/imagem220.jpg
            => `imagem220.jpg'
 Resolving fotos.nazjam.com... 206.51.235.10
 Connecting to fotos.nazjam.com|206.51.235.10|:80... connected.
 HTTP request sent, awaiting response... 200 OK
 Length: 49,230 (48K) [image/jpeg]

 100%[=================================================================================================================>] 49,230 47.79K/s

 10:41:18 (47.67 KB/s) - `imagem220.jpg' saved [49230/49230]

Comments
=======
* Possibly, because the redirect is temporary, Firefox is using the original URL as the basis for the filename heuristic...
* This behavior is repeatable with other images from Reddit. I haven't tested any other sites.
* It occurs even when Firefox is invoked with the _-safe-mode_ switch. I don't believe this is extension related.
* Epiphany handles this case in the manner you would expect: the suggested filename is "imagem220.jpg".

Workaround
=========
* Use File > Save Page As
* Load the image URL directly

System
=====
 ben@dev:~$ lsb_release -rd
 Description: Ubuntu hardy (development branch)
 Release: 8.04

 ben@dev:~$ apt-cache policy firefox-3.0
 firefox-3.0:
   Installed: 3.0~b4+nobinonly-0ubuntu1
   Candidate: 3.0~b4+nobinonly-0ubuntu1
   Version table:
  *** 3.0~b4+nobinonly-0ubuntu1 0
         500 http://archive.ubuntu.com hardy/main Packages
         100 /var/lib/dpkg/status

 ben@dev:~$ uname -a
 Linux dev 2.6.24-12-386 #1 Wed Mar 12 22:30:29 UTC 2008 i686 GNU/Linux

Revision history for this message
Alexander Sack (asac) wrote :

is this still a problem with the latest ffox 3? If so, this is best dealt upstream as its not a ubuntu specific issue. Please open a bug in bugzilla.mozilla.org and post your bug id here. Thanks!

Changed in firefox-3.0:
status: New → Incomplete
Revision history for this message
Martin Mai (mrkanister-deactivatedaccount-deactivatedaccount) wrote :

 We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in firefox-3.0:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.