blob: deab822a9998cfdbbd52c16d18f9f5e0aa4d4371 (
plain) (
tree)
|
|
module Rack
class Head
def initialize(app)
@app = app
end
def call(env)
status, headers, body = @app.call(env)
if env["REQUEST_METHOD"] == "HEAD"
[status, headers, []]
else
[status, headers, body]
end
end
end
end
|