method

_header_for_string

Importance_0
v1_9_3_392 - Show latest stable - 0 notes - Class: CGI
_header_for_string(content_type) private

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File lib/cgi/core.rb, line 175
  def _header_for_string(content_type) #:nodoc:
    buf = ''
    if nph?()
      buf << "#{$CGI_ENV['SERVER_PROTOCOL'] || 'HTTP/1.0'} 200 OK#{EOL}"
      buf << "Date: #{CGI.rfc1123_date(Time.now)}#{EOL}"
      buf << "Server: #{$CGI_ENV['SERVER_SOFTWARE']}#{EOL}"
      buf << "Connection: close#{EOL}"
    end
    buf << "Content-Type: #{content_type}#{EOL}"
    if @output_cookies
      @output_cookies.each {|cookie| buf << "Set-Cookie: #{cookie}#{EOL}" }
    end
    return buf
  end
Register or log in to add new notes.