2008-11-11 16:54:10 +03:00
|
|
|
#!/usr/bin/env ruby
|
2006-06-28 22:11:03 +04:00
|
|
|
|
2012-05-01 19:48:46 +04:00
|
|
|
require File.dirname(__FILE__) + '/../config/boot'
|
|
|
|
require File.dirname(__FILE__) + '/../config/environment'
|
|
|
|
|
|
|
|
class Rack::PathInfoRewriter
|
|
|
|
def initialize(app)
|
|
|
|
@app = app
|
|
|
|
end
|
|
|
|
|
|
|
|
def call(env)
|
|
|
|
env.delete('SCRIPT_NAME')
|
|
|
|
parts = env['REQUEST_URI'].split('?')
|
|
|
|
env['PATH_INFO'] = parts[0]
|
|
|
|
env['QUERY_STRING'] = parts[1].to_s
|
|
|
|
@app.call(env)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Rack::Handler::FastCGI.run Rack::PathInfoRewriter.new(RedmineApp::Application)
|