method

_header_for_modruby

Importance_0
v1_9_3_125 - Show latest stable - 0 notes - Class: CGI
_header_for_modruby(buf) 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 251
  def _header_for_modruby(buf)  #:nodoc:
    request = Apache::request
    buf.scan(/([^:]+): (.+)#{EOL}/) do |name, value|
      warn sprintf("name:%s value:%s\n", name, value) if $DEBUG
      case name
      when 'Set-Cookie'
        request.headers_out.add(name, value)
      when /^status$/
        request.status_line = value
        request.status = value.to_i
      when /^content-type$/
        request.content_type = value
      when /^content-encoding$/
        request.content_encoding = value
      when /^location$/
        request.status = 302 if request.status == 200
        request.headers_out[name] = value
      else
        request.headers_out[name] = value
      end
    end
    request.send_http_header
    return ''
  end
Register or log in to add new notes.