aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/gems/rack-1.1.0/lib/rack/head.rb
diff options
context:
space:
mode:
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.rb19
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