Hi All, i would like to know ,is mod x_sendfile0.11.1 is compatible with apache 2.2.16 -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Amit Tomar
2010-Sep-28 11:27 UTC
Re: is mod x_sendfile0.11.1 is compatible with apche 2.2.16
Amit Tomar wrote:> Hi All, > i would like to know ,is mod x_sendfile0.11.1 is compatible with > apache 2.2.16yaa its compatible with apache 2.2.16 but XSendFileAboveAll is replaced by XSendFilePath .... -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I created a file ''csv_string'' as follows def export_raw @device = Device.find_by_id( params[:id] ) @messages = @device.devmessages.all( :order => "id", :conditions => ["packettime >= ? and packettime <= ?", params[:start_time], params[:end_time]] ) csv_string = FasterCSV.generate do |csv| csv << ["Packet", "Server Receive Time"] @messages.each_with_index do |m,i| x = m.created_at csv << [m.message, x.strftime(''%h %d, %G %r'')] end end send_file csv_string, :type => "application/csv", :x_sendfile=> true, :filename => "rawdata.csv" # send_data(csv_string, # :type => ''text/csv; charset=utf-8; header=present'', #:filename => filename) end I am able to download the file using "send_data csv_string, :type => "application/csv", :filename =>"rawdata.csv" But I am unable to download same file using "send_file csv_string, :type => "application/csv", :x_sendfile=> true, :filename => "rawdata.csv" It gives the error saying that string contains null byte. Can anyone please help me in resolving this issue? Thank you -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 7 Dec 2011, at 07:45, Ajit Teli <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I created a file ''csv_string'' as follows > > ... > > I am able to download the file using > > "send_data csv_string, :type => "application/csv", :filename > =>"rawdata.csv" > > But I am unable to download same file using > > "send_file csv_string, :type => "application/csv", :x_sendfile=> true, > :filename => "rawdata.csv" > > It gives the error saying that string contains null byte. > > Can anyone please help me in resolving this issue? >Xsendfile can only send actual files from the server''s hard disk. You don''t have a file, just a string containing some data. You could write the file to disk and use Xsendfile to send that, but depending on the file size it might not be worth it. You''d also need to clean up files once they''d been sent Fred> > Thank you > > -- > Posted via http://www.ruby-forum.com/. > > -- > You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en. >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.