Method: Spider::HTTP::RackIO#write
- Defined in:
- lib/spiderfw/http/adapters/rack.rb
#write(msg) ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/spiderfw/http/adapters/rack.rb', line 32 def write(msg) send_headers unless @headers_sent #workaround per ruby 1.9.3, problemi su parte di admin, faccio force encoding a utf8 unless msg.to_s.blank? msg_dup = msg.to_s.dup @w.write(msg_dup.respond_to?(:force_encoding) ? msg_dup.force_encoding('UTF-8') : msg_dup) else @w.write(msg) end end |