Sha256: f023942c17a7c3a6329b6fe576f4426ef29140a8ec6a41679494f9afca1678a5

Contents?: true

Size: 301 Bytes

Versions: 43

Compression:

Stored size: 301 Bytes

Contents

module Rack

class Head
  def initialize(app)
    @app = app
  end

  def call(env)
    status, headers, body = @app.call(env)

    if env["REQUEST_METHOD"] == "HEAD"
      body.close if body.respond_to? :close
      [status, headers, []]
    else
      [status, headers, body]
    end
  end
end

end

Version data entries

43 entries across 38 versions & 13 rubygems

Version Path
active_mailer-0.0.10 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/head.rb
rack-1.4.7 lib/rack/head.rb
rack-1.4.6 lib/rack/head.rb
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rack-1.4.5/lib/rack/head.rb
swipe-rails-0.0.5 vendor/bundle/gems/rack-1.4.5/lib/rack/head.rb
active_mailer-0.0.9 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/head.rb
active_mailer-0.0.8 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/head.rb
active_mailer-0.0.7 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/head.rb
active_mailer-0.0.6 test/fixtures/dummyapp_rails_3.2/vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/head.rb
font-awesome-rails-3.1.1.2 vendor/ruby/2.0.0/gems/rack-1.4.5/lib/rack/head.rb
font-awesome-rails-3.1.1.2 vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/head.rb
font-awesome-rails-3.1.1.1 vendor/ruby/2.0.0/gems/rack-1.4.5/lib/rack/head.rb
font-awesome-rails-3.1.1.1 vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/head.rb
challah-1.0.0.beta3 vendor/bundle/gems/rack-1.4.5/lib/rack/head.rb
fc-webicons-0.0.4 vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/head.rb
challah-1.0.0.beta2 vendor/bundle/gems/rack-1.4.5/lib/rack/head.rb
challah-1.0.0.beta vendor/bundle/gems/rack-1.4.5/lib/rack/head.rb
challah-1.0.0.beta vendor/bundle/gems/rack-1.4.3/lib/rack/head.rb
fc-webicons-0.0.3 vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/head.rb
fc-webicons-0.0.2 vendor/bundle/ruby/1.9.1/gems/rack-1.4.5/lib/rack/head.rb