To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / public / dispatch.fcgi.example @ 1586:d0d59d12db94

History | View | Annotate | Download (473 Bytes)

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