rack-mongrel2 icon indicating copy to clipboard operation
rack-mongrel2 copied to clipboard

req.headers['PATTERN'] is nil

Open donpdonp opened this issue 13 years ago • 2 comments

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(//$/, '')

donpdonp avatar Aug 22 '11 18:08 donpdonp

That should be the pattern that mongrel uses to match the route. I'll investigate.

darkhelmet avatar Aug 22 '11 21:08 darkhelmet

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.

darkhelmet avatar Sep 28 '11 03:09 darkhelmet