Method: Rack::Handler::FastCGI.send_headers

Defined in:
lib/rack/handler/fastcgi.rb

.send_headers(out, status, headers) ⇒ Object



71
72
73
74
75
76
77
78
79
80
# File 'lib/rack/handler/fastcgi.rb', line 71

def self.send_headers(out, status, headers)
  out.print "Status: #{status}\r\n"
  headers.each { |k, vs|
    vs.split("\n").each { |v|
      out.print "#{k}: #{v}\r\n"
    }
  }
  out.print "\r\n"
  out.flush
end