# File lib/rack/handler/mongrel.rb, line 45
45:       def process(request, response)
46:         env = {}.replace(request.params)
47:         env.delete "HTTP_CONTENT_TYPE"
48:         env.delete "HTTP_CONTENT_LENGTH"
49: 
50:         env["SCRIPT_NAME"] = ""  if env["SCRIPT_NAME"] == "/"
51: 
52:         rack_input = request.body || StringIO.new('')
53:         rack_input.set_encoding(Encoding::BINARY) if rack_input.respond_to?(:set_encoding)
54: 
55:         env.update({"rack.version" => Rack::VERSION,
56:                      "rack.input" => rack_input,
57:                      "rack.errors" => $stderr,
58: 
59:                      "rack.multithread" => true,
60:                      "rack.multiprocess" => false, # ???
61:                      "rack.run_once" => false,
62: 
63:                      "rack.url_scheme" => "http",
64:                    })
65:         env["QUERY_STRING"] ||= ""
66: 
67:         status, headers, body = @app.call(env)
68: 
69:         begin
70:           response.status = status.to_i
71:           response.send_status(nil)
72: 
73:           headers.each { |k, vs|
74:             vs.split("\n").each { |v|
75:               response.header[k] = v
76:             }
77:           }
78:           response.send_header
79: 
80:           body.each { |part|
81:             response.write part
82:             response.socket.flush
83:           }
84:         ensure
85:           body.close  if body.respond_to? :close
86:         end
87:       end