method
_header_for_modruby
v1_9_3_392 -
Show latest stable
-
0 notes -
Class: CGI
- 1_8_6_287
- 1_8_7_72
- 1_8_7_330
- 1_9_1_378
- 1_9_2_180
- 1_9_3_125 (0)
- 1_9_3_392 (0)
- 2_1_10 (0)
- 2_2_9 (0)
- 2_4_6 (0)
- 2_5_5 (0)
- 2_6_3 (0)
- What's this?
_header_for_modruby(buf)
private
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