brady8 wrote:
> Your other solution that should work is to set the header directly
> that IE is parsing, Content-Disposition.
> 
> i.e.:
> 
> headers['Content-Disposition'] = "inline; filename=\"" + @filename +
> "\""
> 
> -Brady
> [EMAIL PROTECTED]
> 
> On Sep 16, 12:28�pm, Noel Walters <[EMAIL PROTECTED]>

Thanks, but send_file already puts the correct Content-Disposition 
header in the response, but IE only seems to work properly when it's 
missing - but there are other differences in the headers, so I can't 
tell if that is significant or not.

Here is the response header that you get when the server sends a file 
from a public folder. It works properly with all the browsers I've tried 
-

Status=OK - 200
Date=Tue, 16 Sep 2008 18:17:09 GMT
Vary=Host
Etag="48cfb25c-65c2f-918190"
Last-Modified=Tue, 16 Sep 2008 13:19:24 GMT
Content-Type=image/jpeg
Content-Length=416815
X-Cache=MISS from www.sharehost.co.uk
Keep-Alive=timeout=15, max=99
Connection=Keep-Alive

This is what send_file is producing. It doesn't work properly with IE -

Status=OK - 200
Date=Tue, 16 Sep 2008 18:16:59 GMT
Server=Mongrel 1.1.4
Vary=Host
Status=200 OK
X-Runtime=0.01416
Content-Transfer-Encoding=binary
Cache-Control=private
Content-Disposition=inline; filename="16.jpg"
Content-Type=image/jpeg
Content-Length=164553
X-Cache=MISS from www.sharehost.co.uk
Keep-Alive=timeout=15, max=100
Connection=Keep-Alive

I did wonder if the doubled Status header is the source of the problem - 
but I've no idea how to get rid of it without abandoning the use of 
send_file.

if there was a way to get send_file to produce a response like the 
first one I'd be quite happy.

otherwise I'll just have to put up with it - it's not terribly serious 
just inconsistent.

Maybe I could make the controller create a publicly accesible symlink to 
the file, do a redirect to the same controller/action and then delete 
the link again.

I've been frigging about with this for 3 days now. Not feeling terribly 
Agile.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to