diff options
author | Louise Crow <louise.crow@gmail.com> | 2011-02-21 19:55:41 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2011-02-21 19:55:41 +0000 |
commit | 2bcc1cc44b8f887a9969a83ed216486dd9677f89 (patch) | |
tree | 1fbc184ac1475d067c0e9a40bce96d77cc1b2831 /vendor/gems/rack-1.1.0/lib/rack/head.rb | |
parent | 95b596f2d5d5c8708435996d8e918b8f8e552995 (diff) |
Unpack rack 1.1.0 to vendor gems
Diffstat (limited to 'vendor/gems/rack-1.1.0/lib/rack/head.rb')
-rw-r--r-- | vendor/gems/rack-1.1.0/lib/rack/head.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/gems/rack-1.1.0/lib/rack/head.rb b/vendor/gems/rack-1.1.0/lib/rack/head.rb new file mode 100644 index 000000000..deab822a9 --- /dev/null +++ b/vendor/gems/rack-1.1.0/lib/rack/head.rb @@ -0,0 +1,19 @@ +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 |