[Mono-bugs] [Bug 74688][Nor] Changed - Cannot create 'download' page for inline PDF viewing with IE

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Thu, 21 Apr 2005 22:47:32 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by eto@shaw.ca.

http://bugzilla.ximian.com/show_bug.cgi?id=74688

--- shadow/74688	2005-04-21 21:33:04.000000000 -0400
+++ shadow/74688.tmp.29270	2005-04-21 22:47:32.000000000 -0400
@@ -122,6 +122,55 @@
 aspnet_regiis.exe -lv and the 1.0.3705 and 1.1.4322 versions are also
 installed but not default.
 
 I tried just Response.Redirect and that works fine. I'm going to try
 to make this work on windows for me. I'll send you an email if I find
 how to make this work.
+
+------- Additional Comments From eto@shaw.ca  2005-04-21 22:47 -------
+Aha!  Found it.
+
+Made a little program to check the headers.  Output is this:
+
+
+// IIS
+Headers (http://localhost/TestPDFDownload/WebForm1.aspx):
+        Server: Microsoft-IIS/5.1
+        Date: Fri, 22 Apr 2005 01:29:32 GMT
+        X-Powered-By: ASP.NET
+        X-AspNet-Version: 1.1.4322
+        Content-Disposition: filename="svn-book.pdf"
+        Cache-Control: private
+        Content-Type: Application/pdf
+        Content-Length: 1485021
+
+// XSP
+Headers (http://rd-spider:8080/WebForm1.aspx):
+        Server: Mono-XSP Server/1.0.8.0 Unix
+        Content-Disposition: filename="svn-book.pdf"
+        X-Powered-By: Mono
+        Date: Thu, 21 Apr 2005 01:27:44 GMT
+        Content-Length: 1485021
+        Content-Type: Application/pdf; charset=utf-8
+        Set-Cookie: ASPSESSION=00D35A827375001B5247483FB52D90; path=/
+        Keep-Alive: timeout=15, max=99
+        Connection: Keep-Alive
+
+
+Note the "; charset=utf-8" at the end of the Content-Type.  If i
+comment out this line in HttpRequest.cs, then it works the same on
+both xsp and iis:
+
+if (_sContentType.IndexOf ("charset=") == -1) {
+	if (Charset.Length == 0) {
+		Charset = ContentEncoding.HeaderName;
+	}
+
+	// Time to build our string
+	if (Charset.Length > 0) {
+	// HERE-> _sContentType += "; charset=" + Charset;
+	}
+}
+
+I don't think the charset should be specified for binary files..
+perhaps it shouldn't be added if it hasn't been specified explicitly?
+