LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Ruby/Rails > Internal Redirect problem

Reply
 
Thread Tools Display Modes
  #1  
Old 05-29-2008, 03:17 PM
sderrick sderrick is offline
Member
 
Join Date: Apr 2005
Location: NM
Posts: 18
Default Internal Redirect problem

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

def sendfile
@name = session[:jobname] + ".zip"
filename = "ublic/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
Reply With Quote
  #2  
Old 05-29-2008, 03:26 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Install wireshark and sniff the traffic see if you can find out anything.
Reply With Quote
  #3  
Old 05-30-2008, 03:25 PM
sderrick sderrick is offline
Member
 
Join Date: Apr 2005
Location: NM
Posts: 18
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
Reply With Quote
  #4  
Old 05-30-2008, 03:31 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
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 = "ublic/download/" + @name
headers["x-litespeed-Location"] = filename
end
Reply With Quote
  #5  
Old 05-31-2008, 05:49 AM
sderrick sderrick is offline
Member
 
Join Date: Apr 2005
Location: NM
Posts: 18
Thanks,

I'll give it a go.

Scott
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:50 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.