I have a quirk in my application : i can’t make send_data to stream for
download (disposition=attachment) an image over SSL with internet
explorer.
Works fine with FF (ssl or not), works fine inline (ssl or not, IE or
FF), works even fine without ssl (still IE).
But when i try to get the link through SSL, IE somehow gives me a :
“cannot download blabla from someurl, not able to open this internet
site, requested site either unavailable or cannot be found. please try
again later…”
Of course it doesn’t work later. The only thing i could find about this
is from the rails api on send_file : “IE versions 4, 5, 5.5, and 6 are
all known to have a variety of quirks (especially when downloading over
SSL)”
see my source below. I’m using lighttpd with fcgi, nothing fancy.
def download
qr = blabla (edit)
send_data(qr.to_blob, :filename => qr.code+'.png', :type =>
Thanks ! Works great ! Had to delete the
pragma as well.
I have another issue with IE on this actually, it doesn’t look like
caring much about my type=>‘image/x-png’ : I get
Type: Unkown File Type.
I’ve been careful to check that this one was on the list of known mime
types
(),
and I know from that article that IE checks the 256 first bytes to
ensure the type matches the data.
Is there a problem with my image (built within rmagick) or is it
related to headers and cache once again ? (first fix didn’t do much for
that other problem).
here is my to_blob : def to_blob(fileformat=‘PNG’)
draw()
return @imgl.to_blob do
self.format = fileformat
end
end Stan
Jeremy Kemper wrote: