Bug 12548 - "Source" of animated gif shown instead of the image itself when opened in new tab
Summary: "Source" of animated gif shown instead of the image itself when opened in new...
Status: RESOLVED DUPLICATE of bug 12341
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 420+
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://www.livejournal.com/userpic/57...
Depends on:
Reported: 2007-02-02 12:59 PST by Moria Legge
Modified: 2007-02-04 01:16 PST (History)
3 users (show)

See Also:

Test image (12.08 KB, image/gif)
2007-02-02 21:43 PST, David Kilzer (:ddkilzer)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moria Legge 2007-02-02 12:59:48 PST
First page visited in a new tab, shows a page of text instead of the animated image. Copy/pasting  or reloading the the link brings up the image.
Comment 1 Alexander Kellett 2007-02-02 13:02:58 PST
good point on the reloading
Comment 2 David Kilzer (:ddkilzer) 2007-02-02 21:41:30 PST
Confirmed using a local debug build of WebKit r19382 with Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8N1037).

Comment 3 David Kilzer (:ddkilzer) 2007-02-02 21:43:33 PST
Created attachment 12890 [details]
Test image
Comment 4 David Kilzer (:ddkilzer) 2007-02-02 21:45:35 PST
When Attachment 12890 [details] is clicked on, it is always drawn as an image for me.  This tells me that it's a transmission issue.  Here are the HTTP headers returned from requesting the GIF:

$ curl --head http://www.livejournal.com/userpic/57857879/773026
HTTP/1.0 200 OK
Date: Sat, 03 Feb 2007 05:33:52 GMT
Server: Apache
Set-Cookie: ljuniq=JiHiQtEvgXf2UUr:1170480832:pgstats0; expires=Wednesday, 04-Apr-2007 05:33:52 GMT; domain=.livejournal.com; path=/
X-REPROXY-CACHE-FOR: 3600; Last-Modified Content-Type
Content-length: 12371
Cache-Control: no-transform
Last-Modified: Sat, 03 Feb 2007 05:33:52 GMT
Keep-Alive: timeout=30, max=100
Connection: keep-alive
Content-Type: image/gif

Comment 5 David Kilzer (:ddkilzer) 2007-02-02 21:55:58 PST
Tested on shipping Safari 2.0.4 (419.3) on Mac OS X 10.4.8 (8N1037).  The result is the exact same behavior, so this isn't a regression.

If I had to guess, this is probably a Foundation issue again.  Looking at the headers listed in Comment #4, my guess is that Foundation is getting confused by the additional "Content-Type" string in the odd "X-REPROXY-CACHE-FOR" header and ignoring the second one at the end.

Steps to reproduce:

1. Open Safari/WebKit.
2. Open a brand new browser window.
3. Paste URL into address bar: http://www.livejournal.com/userpic/57857879/773026
4. Hit Enter.
Comment 6 David Kilzer (:ddkilzer) 2007-02-03 16:31:04 PST
This bug needs a Radar bug filed for it, but the bug needs to be assigned/forwarded to the Foundation group.

Comment 7 Alexey Proskuryakov 2007-02-03 23:46:48 PST
Actually, I doubt that it's caused by X-REPROXY-CACHE. Note that the problem only happens when the image is already cached:

$ curl -I http://www.livejournal.com/userpic/57857879/773026 --header "If-Modified-Since: Sun, 04 Feb 2007 07:29:44 GMT"
HTTP/1.0 304 Not Modified
Server: BIG-IP
Connection: Keep-Alive
Content-Type: text/html
Content-Length: 0

I guess it's the known problem of honoring Content-Type of 304 responses. But a new Radar report could be useful anyway, given that this happens on a prominent site.
Comment 8 David Kilzer (:ddkilzer) 2007-02-04 01:16:01 PST
Per Comment #7, this is a duplicate of Bug 12341.  Thanks Alexey!

*** This bug has been marked as a duplicate of 12341 ***