| Class | Maveric::MongrelHandler |
| In: |
maveric/mongrel.rb
|
| Parent: | Mongrel::HttpHandler |
# File maveric/mongrel.rb, line 4
4: def initialize maveric, opts={}
5: ::Maveric.type_check :maveric, maveric do |k| k <= ::Maveric end
6: ::Maveric.type_check :opts, opts, Hash
7: super()
8: @request_notify = true
9: @maveric = maveric.new opts
10: end
NOTE: Update doc.
# File maveric/mongrel.rb, line 14
14: def process request, response
15: Maveric.log.info "Mongrel+#{self.class}#process"
16: reply = @maveric.process request.body, request.params
17: # output the result
18: response.start reply.status do |head,out|
19: reply.headers.each {|k,v| head[k] = v }
20: out.write reply.body
21: end
22: end
Prepares by loading session and reflection data into the request params.
# File maveric/mongrel.rb, line 25
25: def request_begins params
26: begin
27: Maveric.log.info "Mongrel+#{self.class}#request_begins"
28: @maveric.prepare_environment params
29: rescue
30: Maveric.log.fatal "#{$!.inspect}\n#{$@[0..5]*"\n"}"
31: end
32: end
Does nothing yet. Yet.
# File maveric/mongrel.rb, line 35
35: def request_progess params, clen, total
36: begin
37: Maveric.log.info "Mongrel+#{self.class}#request_progess"+
38: ": #{clen}/#{total}"
39: Maveric.log.debug params
40: rescue
41: Maveric.log.fatal "#{$!.inspect}\n#{$@[0..5]*"\n"}"
42: end
43: end