Skip to content

Instantly share code, notes, and snippets.

@volh
Created December 5, 2010 22:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save volh/729542 to your computer and use it in GitHub Desktop.
Save volh/729542 to your computer and use it in GitHub Desktop.
class Rack::NoSpoon
def initialize(app)
@app = app
end
def call(env)
if env["HTTP_USER_AGENT"] =~ /MSIE 6/
[418, {'Content-Type' => 'application/msword'}, "I'm a teapot"]
else
@app.call(env)
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment