



GET /images/logo.gif HTTP/1.1
Accept-Language: en



RFC 2324 HTCPCP/1.0 1 April 1998 In practice, most automated coffee pots cannot currently provide additions. 2.3.2 418 I'm a teapot Any attempt to brew coffee with a teapot should result in the error code "418 I'm a teapot". The resulting entity body MAY be short and stout.



codeheadersbodycode => Integerheaders => Hashbody => String[200, {'Content-Type' => 'text/plain'}, 'Hello!']
class Awesome
def call(env)
[200, {'Content-Type' => 'text/plain'}, 'AWESOME.']
end
end
lambda { |env| [200, {'Content-Type' => 'text/plain'}, 'AWESOME.'] }
env what?config.ru
require 'rack/lobster'
run Rack::Lobster.new
,.---._
,,,, / `,
\\\\ / '\_ ;
|||| /\/``-.__\;'
::::/\/_
{{`-.__.-'(`(^^(^^^(^ 9 `.========='
{{{{{{ { ( ( ( ( (-----:=
{{.-'~~'-.(,(,,(,,,(__6_.'=========.
::::\/\
|||| \/\ ,-'/,
//// \ `` _/ ;
'''' \ ` .'
`---'
# config.ru
class Awesome
def call(env)
[200, {'Content-Type' => 'text/plain'}, 'AWESOME.']
end
end
run Awesome
run, use

class PassThrough
def initialize(app)
@app = app
end
def call(env)
@app.call(env)
end
end
def call(env)
if env["PATH_INFO"] == "/WMD"
[
404,
{"Content-Type" => "text/plain"},
"Not found"
]
else
@app.call(env)
end
end
def call(env)
if env["CONTENT_TYPE"] == "nobel-prize/peace"
[
202,
{"Content-Type" => "nobel-prize/peace"},
"Accepted"
]
else
@app.call(env)
end
end
def call(env)
request_uri = env['REQUEST_URI']
if request_uri =~ /kanye=true/
env['REQUEST_URI'].gsub!("&kanye=true","")
@app.call(env)
else
req = "http://#{env['HTTP_HOST']}#{request_uri}&kanye=true"
[
302,
{'Location' => "http://kanyelicious.appspot.com/" + req },
'Redirecting...'
]
end
end

tmp/maintenanance.txt exists# config.ru
run Rack::Adapter::Rails.new(:environment => ENV['RAILS_ENV'])
require File.join('vendor', 'bundler_gems', 'environment')
require File.join('config', 'environment')
use Rack::Static,
:urls => ["/index.html",
"/favicon.ico",
"/images",
"/stylesheets"],
:root => "public/maintenance"
use Hostess
use Rack::Maintenance,
:file => File.join('public', 'maintenance', 'index.html')
run Sinatra::Application
use Rack