::CGI
Used to wrap the normal args variable used inside CGI.
# File lib/rack/adapter/rails.rb, line 159 159: def args 160: @args 161: end
Used to wrap the normal env_table variable used inside CGI.
# File lib/rack/adapter/rails.rb, line 164 164: def env_table 165: @request.env 166: end
# File lib/rack/adapter/rails.rb, line 102 102: def header(options = "text/html") 103: if options.is_a?(String) 104: @response['Content-Type'] = options unless @response['Content-Type'] 105: else 106: @response['Content-Length'] = options.delete('Content-Length').to_s if options['Content-Length'] 107: 108: @response['Content-Type'] = options.delete('type') || "text/html" 109: @response['Content-Type'] += "; charset=" + options.delete('charset') if options['charset'] 110: 111: @response['Content-Language'] = options.delete('language') if options['language'] 112: @response['Expires'] = options.delete('expires') if options['expires'] 113: 114: @response.status = options.delete('Status') if options['Status'] 115: 116: # Convert 'cookie' header to 'Set-Cookie' headers. 117: # Because Set-Cookie header can appear more the once in the response body, 118: # we store it in a line break seperated string that will be translated to 119: # multiple Set-Cookie header by the handler. 120: if cookie = options.delete('cookie') 121: cookies = [] 122: 123: case cookie 124: when Array then cookie.each { |c| cookies << c.to_s } 125: when Hash then cookie.each { |_, c| cookies << c.to_s } 126: else cookies << cookie.to_s 127: end 128: 129: @output_cookies.each { |c| cookies << c.to_s } if @output_cookies 130: 131: @response['Set-Cookie'] = [@response['Set-Cookie'], cookies].compact 132: # See http://groups.google.com/group/rack-devel/browse_thread/thread/e8759b91a82c5a10/a8dbd4574fe97d69?#a8dbd4574fe97d69 133: if Thin.ruby_18? 134: @response['Set-Cookie'].flatten! 135: else 136: @response['Set-Cookie'] = @response['Set-Cookie'].join("\n") 137: end 138: end 139: 140: options.each { |k,v| @response[k] = v } 141: end 142: 143: "" 144: end
# File lib/rack/adapter/rails.rb, line 146 146: def params 147: @params ||= @request.params 148: end
# File lib/rack/adapter/rails.rb, line 154 154: def query_string 155: @request.query_string 156: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.