Bug 14882 - REGRESSION (r24866): text/plain documents are always downloaded
Summary: REGRESSION (r24866): text/plain documents are always downloaded
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
: P1 Major
Assignee: Nobody
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2007-08-04 09:58 PDT by David Kilzer (:ddkilzer)
Modified: 2007-11-21 03:33 PST (History)
3 users (show)

See Also:


Attachments
Test case (50 bytes, text/plain)
2007-08-04 10:00 PDT, David Kilzer (:ddkilzer)
no flags Details
Patch v1 (4.00 KB, patch)
2007-08-04 12:28 PDT, David Kilzer (:ddkilzer)
oliver: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2007-08-04 09:58:17 PDT
* SUMMARY
Clicking on a link that returns a text/plain document is always downloaded.  There is no way to view it in the browser.

* STEPS TO REPRODUCE
1. Launch Safari/WebKit.
2. Click on a text/plain link.

* EXPECTED RESULTS
The text/plain document should be viewed within the browser.

* ACTUAL RESULTS
The text/plain document is always downloaded.

* REGRESSION
This is a regression from shipping Safari 2.0.4 (419.3) with original WebKit, as well as the Safari 3 Public Beta v. 3.0.3 (522.12.1).

* NOTES
Probably regressed in r24866, the fix for Bug 14824.
Comment 1 David Kilzer (:ddkilzer) 2007-08-04 10:00:45 PDT
Created attachment 15839 [details]
Test case
Comment 2 David Kilzer (:ddkilzer) 2007-08-04 10:01:11 PDT
<rdar://problem/5386550>
Comment 3 David Kilzer (:ddkilzer) 2007-08-04 11:07:09 PDT
(In reply to comment #0)
> * NOTES
> Probably regressed in r24866, the fix for Bug 14824.

Confirmed.

Comment 4 David Kilzer (:ddkilzer) 2007-08-04 12:05:51 PDT
I have a patch for this.

Comment 5 David Kilzer (:ddkilzer) 2007-08-04 12:28:02 PDT
Created attachment 15842 [details]
Patch v1

Proposed fix.
Comment 6 David Kilzer (:ddkilzer) 2007-08-04 19:14:01 PDT
Fixed in r24869.  Thanks for the review olliej!

Comment 7 Brady Eidson 2007-08-04 22:12:02 PDT
This rebroke http://bugs.webkit.org/show_bug.cgi?id=14824

Granted, I did screw up the original fix, but this isn't the right fix - I'll explore the reasons why in http://bugs.webkit.org/show_bug.cgi?id=14824
Comment 8 James Wheare 2007-11-21 03:15:23 PST
This is still broken in Safari 3.0.4 (5523.10) in certain cases . Here are the response headers for a file that still gets downloaded (Note: document served with HTTP Basic authentication)

HTTP/1.1 200 OK
Wed, 21 Nov 2007 11:08:50 GMT
Apache/1.3.31 (Unix) PHP/4.4.3
PHP/4.4.3
gzip
Accept-Encoding
close
chunked
text/plain;charset=utf-8
Comment 9 James Wheare 2007-11-21 03:21:45 PST
Possibly related to http://bugs.webkit.org/show_bug.cgi?id=15771
Comment 10 David Kilzer (:ddkilzer) 2007-11-21 03:25:00 PST
(In reply to comment #8)
> This is still broken in Safari 3.0.4 (5523.10) in certain cases . Here are the
> response headers for a file that still gets downloaded (Note: document served
> with HTTP Basic authentication)
> 
> HTTP/1.1 200 OK
> Wed, 21 Nov 2007 11:08:50 GMT
> Apache/1.3.31 (Unix) PHP/4.4.3
> PHP/4.4.3
> gzip
> Accept-Encoding
> close
> chunked
> text/plain;charset=utf-8

Hi James, please open a new bug report for this issue.  Also, please include the header names with the field values above, and please state whether you're using Tiger or Leopard.  Thanks!

Comment 11 James Wheare 2007-11-21 03:33:48 PST
http://bugs.webkit.org/show_bug.cgi?id=16084