Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 98b5890e5e
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (20 sloc) 0.651 kb
#!/usr/local/bin/ruby
$: << File.expand_path("../../lib", __FILE__)
require 'hoodwinkd'
require 'uri'
require 'fcgi'
Dir.chdir('/home/sites/hoodwink.d/public')
Hoodwinkd.connect '../config/database.yml'
Hoodwinkd.create if Hoodwinkd.respond_to? :create
FCGI.each do |req|
# req.out << "Content-Type: text/html\n\n#{ req.env.inspect }"
req.env['SCRIPT_NAME'] = '/'
u = URI(req.env['REQUEST_URI'])
req.env['PATH_INFO'] =
u.path.gsub( %r!(.)/+$!, '\1' ).
gsub( %r!/+!, '/' ).
gsub( '?', '%3F' )
req.env['QUERY_STRING'] = u.query
req.out << Hoodwinkd.run(req.in, req.env)
req.finish
end
Jump to Line
Something went wrong with that request. Please try again.