In my Rails (2.3.10). I found some weird issue. My application needs to download a XML file when a user hit the downloaded URL.
For example :
http://www.example.com/test/all.xml
The problem here is, If I hit the url with alias name (http://www.example.com/test/all.xml). the XML not get downloaded.
If I hit production direct URL like http://xx.xx.xx.xx:3000/test/all.xml . The XML started downloading without any problem.
Can any one help on this. ? Please
Here is my code in Test controller :
def index
file_path="/tmp/all.xml"
send_file file_path, :type => 'text/xml; charset=utf-8'
end
I have placed the "all.xml" file into my production server /tmp/all.xml.
I am using Jruby(1.6.5) and a WAR file is deploying to Tomcat....