php - When sending headers to download a PDF, Safari appends .html -


here request , response headers

http://www.example.com/get/pdf  /~get/pdf http/1.1 host: www.example.com user-agent: mozilla/5.0 (macintosh; u; intel mac os x 10.6; en-us; rv:1.9.2.3) gecko/20100401 firefox/3.6.3 accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 accept-language: en-us,en;q=0.5 accept-encoding: gzip,deflate accept-charset: iso-8859-1,utf-8;q=0.7,*;q=0.7 keep-alive: 115 connection: keep-alive referer: http://www.example.com cookie: etc   http/1.1 200 ok date: thu, 29 apr 2010 02:20:43 gmt server: apache/2.2.14 (unix) mod_ssl/2.2.14 openssl/0.9.8i dav/2 mod_auth_passthrough/2.1 mod_bwlimited/1.4 frontpage/5.0.2.2635 x-powered-by: me expires: thu, 19 nov 1981 08:52:00 gmt pragma: no-cache cache-control: private content-disposition: attachment; filename="file #1.pdf" content-length: 18776 keep-alive: timeout=5, max=100 connection: keep-alive content-type: text/html; charset=utf-8 ---------------------------------------------------------- 

basically, response headers sent dompdf's stream() method.

in firefox, file prompted file #1.pdf. however, in safari, file saved file #1.pdf.html.

does know why safari appending html extension filename?

i'm using kohana 3, serving pdf controller method.

from see content type incorrect, believe if fixed, problem solved.


Comments

Popular posts from this blog

javascript - Enclosure Memory Copies -

php - Replacing tags in braces, even nested tags, with regex -