rack-mongrel2
rack-mongrel2 copied to clipboard
req.headers['PATTERN'] is nil
What is supposed to be in req.headers['PATTERN'] ? My rails app (the typo blog software) displayed the front page fine on the first load, then hitting reload in the browser caused a ruby exception.
/usr/local/ruby/1.9.2-p290/lib/ruby/gems/1.9.1/gems/rack-mongrel2-0.2.3/lib/rack/handler/mongrel2.rb:34:in `run': You have a nil object when you didn't expect it! (NoMethodError) You might have expected an instance of Array. The error occurred while evaluating nil.split
34: script_name = ENV['RACK_RELATIVE_URL_ROOT'] || req.headers['PATTERN'].split('(', 2).first.gsub(//$/, '')
That should be the pattern that mongrel uses to match the route. I'll investigate.
I just got a thing from the mailing list about this. Apparently it's something in M2. Waiting to see what the list replies with.