Bug 16084 - File served as text/plain downloaded
Summary: File served as text/plain downloaded
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac (Intel) OS X 10.5
: P2 Major
Assignee: Nobody
URL: http://james.wheare.org/stuff/test.txt
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2007-11-21 03:29 PST by James Wheare
Modified: 2007-11-23 07:28 PST (History)
3 users (show)

See Also:


Attachments
Downloaded from http://james.wheare.org/stuff/test.txt (618 bytes, text/plain)
2007-11-21 03:32 PST, James Wheare
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description James Wheare 2007-11-21 03:29:44 PST
Loading this URL in Safari 3 on Leopard prompts the file to be downloaded.

curl -I http://james.wheare.org/stuff/test.txt
HTTP/1.1 200 OK
Date: Wed, 21 Nov 2007 11:26:01 GMT
Server: Apache
Last-Modified: Wed, 21 Nov 2007 11:24:51 GMT
ETag: "1173c26-26a-43f6ea13e26c0"
Accept-Ranges: bytes
Content-Length: 618
Content-Type: text/plain; charset=UTF-8

Is there something in the content that provokes MIME type sniffing?
Comment 2 James Wheare 2007-11-21 03:32:53 PST
Created attachment 17428 [details]
Downloaded from http://james.wheare.org/stuff/test.txt

Left the type as auto-detect
Comment 3 Mark Rowe (bdash) 2007-11-21 05:32:56 PST
I suspect this is due to CFNetwork doing content sniffing, detecting non-ASCII bytes set, and deciding that the server is lying about the MIME type.
Comment 4 David Kilzer (:ddkilzer) 2007-11-21 10:21:54 PST
Works fine with Safari 3.0.4 (523.12) on Mac OS X 10.4.11 (8S165) Tiger.

As Mark noted in Comment #3, this is likely a CFNetwork issue.

Comment 5 David Kilzer (:ddkilzer) 2007-11-21 10:22:22 PST
<rdar://problem/5610097>
Comment 6 David Kilzer (:ddkilzer) 2007-11-21 10:23:42 PST
Thanks for the bug report, James!

I'm closing this bug as RESOLVED/INVALID since the bug is not in WebKit itself.  The issue will be tracked internally via the Radar bug opened.

Comment 7 mitz 2007-11-23 07:28:38 PST
This is fixed in TOT. Another dupe of <rdar://problem/5313523>, fixed in <http://trac.webkit.org/projects/webkit/changeset/26758>.