tags:

views:

4

answers:

0

Hii All, i loaded mod_xsendfile.so in apche , i added few line in httpd.conf files

LoadModule xsendfile_module modules/mod_xsendfile.so

XSendFile on

XSendFileAllowAbove on

ServerName src

DocumentRoot C:/InstantRails-2.0-win/rails_apps/src/public/

ProxyPass / http://localhost:3000/

ProxyPassReverse same as above

now in my raila application i have a streams controller and inside streams controller i have a function named download ,code for code download is below

def download

@stream = Stream.find(params[:id])

filename = "#{@stream.location}"

response.headers['Content-Type'] = "application/force-download"

response.headers['Content-Disposition'] = "attachment; filename=\"#{File.basename(filename)}\""

response.headers["X-Sendfile"] = @stream.location

response.headers['Content-length'] = File.size(filename)

render :nothing => true

end

Problem is my rails application still handling this request but i would like apache to handle this request ,can anyone tell me how i configure apche to handle this request??