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 / .svn / pristine / 99 / 99e2701a14c4f2125c8873be0b1ded74098d370b.svn-base @ 1297:0a574315af3e

History | View | Annotate | Download (473 Bytes)

1 1296:038ba2d95de8 Chris
#!/usr/bin/env ruby
2
3
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)