Bug 15144 - URL "extension" used instead of content-type resulting in page download not display
Summary: URL "extension" used instead of content-type resulting in page download not d...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 523.x (Safari 3)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2007-09-04 13:32 PDT by Curt Arnold
Modified: 2014-12-14 19:41 PST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Curt Arnold 2007-09-04 13:32:05 PDT
The trailing characters of a URL apparently are used to override the content type returned from the web server.  For example,

http://www.apache.org/dyn/closer.cgi/logging/log4j/1.2.15/apache-log4j-1.2.15.tar.gz

returns a web page that displays the available mirrors for apache-log4j-1.2.15.tar.gz and the response header specifies that the response is text/html.  However, WebKit and Safari ignore that content type and apparently guess that the content is binary based on the "extension" of the URL and download the web page.  If the URL is modified to add a ".html" to the end, the page display appropriately in WebKit, however the actual download links would be broken (the closer.cgi script builds the download links from the URL fragment after closer.cgi).  Same thing happens when the URL ends with ".zip".

Firefox (and likely IE) will properly honor the content-type.

This bug may be related to bug 12010.
Comment 1 Mark Rowe (bdash) 2007-09-04 18:47:41 PDT
<rdar://problem/5460874>
Comment 2 Mark Rowe (bdash) 2007-09-04 18:48:39 PDT
I suspect this is happening below WebKit in the Foundation networking layer.  Does this also occur in Safari 2.0.x?
Comment 3 Curt Arnold 2007-09-04 20:38:16 PDT
Problem originally noticed and confirmed in Safari 2.0.4 (419.3).  Also occurs on iPhone's Safari and Safari 3.0.3 beta on Windows.

Problem does not occur on Konqueror 3.5.2 on Ubuntu 6.06.1 which could be consistent with the problem being beneath WebKit.
Comment 4 Brian Burg 2014-12-14 19:41:11 PST
This does not repro for me any more. It has probably been long-fixed.