Firefox sporadically displays file stream instead of document

When a user requests to download a document, I write a PDF file to HttpResponse using the HttpResponse.OutputStream.Write method. It works in every browser except Firefox (3.5.8). Firefox sometimes displays a file, and sometimes it displays the actual stream of bytes. When it displays a stream of bytes, the HTTP response never ends. I see the status "data transfer", and the byte stream ends with EOF. After a while, I get a "reset" window.

alt text http://img31.imageshack.us/img31/7907/displaybytes.png alt text http://img193.imageshack.us/img193/7246/displayendofstream.png alt text http://img211.imageshack.us/ img211 / 1774 / timeout.png

Here is the response header:

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 103185
Content-Type: application/pdf
Expires: -1
Server: Microsoft-IIS/7.0
X-AspNet-Version: 2.0.50727
Content-Description: stuff.pdf
Content-Disposition: inline;filename="stuff.pdf"
X-Powered-By: ASP.NET
Date: Mon, 22 Feb 2010 16:15:38 GMT
+3
5

, . , Response.End() .

0

, , mime . , FF .

, , , mime.

+1

, Firefox Acrobat.

, - , , . .

, , . , . . , .

Mozilla , .

, Content-Disposition "", FF. " ". "", .

Content-Disposition: attachment; filename=stuff.pdf
+1

, PDF , inline, , . VSS , PDF, , . PDF , . , , PDF , readonly .

, .

,

0

, PDF-, ? , PDF , .

0

Source: https://habr.com/ru/post/1733916/


All Articles