Internal Redirect problem

#1
I'm using Internal Redirect to send large files. Here's my function:

def sendfile
@name = session[:jobname] + ".zip"
filename = ":public/download/" + @name
headers["Location"] = filename
redirect_to(filename)
end

It works fine on Firefox but Safari and IE7 hang for a while and then say there is no document as that address?

Anybody else seen this issue? Is my code correct?

thanks,

Scott
 
#3
It appears that Safari and IE choke on having spaces in the redirect address. Not to surprising. Firefox has no problem.

Rails must have a built in path tool to convert it to a safe href?

Scott
 

mistwang

LiteSpeed Staff
#4
If the browser receive the redirect response, a external redirect is used, not internal redirect. Maybe you should try

def sendfile
@name = session[:jobname] + ".zip"
filename = ":public/download/" + @name
headers["x-litespeed-Location"] = filename
end
 
Top