You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dispatch.fcgi.example 473B

1234567891011121314151617181920
  1. #!/usr/bin/env ruby
  2. require File.dirname(__FILE__) + '/../config/boot'
  3. require File.dirname(__FILE__) + '/../config/environment'
  4. class Rack::PathInfoRewriter
  5. def initialize(app)
  6. @app = app
  7. end
  8. def call(env)
  9. env.delete('SCRIPT_NAME')
  10. parts = env['REQUEST_URI'].split('?')
  11. env['PATH_INFO'] = parts[0]
  12. env['QUERY_STRING'] = parts[1].to_s
  13. @app.call(env)
  14. end
  15. end
  16. Rack::Handler::FastCGI.run Rack::PathInfoRewriter.new(RedmineApp::Application)