Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
self
/
root
/
opt
/
ruby-2.7
/
usr
/
lib
/
ruby
/
gems
/
2.7.0
/
gems
/
rack-2.2.3
/
lib
/
rack
/
//proc/self/root/opt/ruby-2.7/usr/lib/ruby/gems/2.7.0/gems/rack-2.2.3/lib/rack/head.rb
# frozen_string_literal: true module Rack # Rack::Head returns an empty body for all HEAD requests. It leaves # all other requests unchanged. class Head def initialize(app) @app = app end def call(env) status, headers, body = @app.call(env) if env[REQUEST_METHOD] == HEAD [ status, headers, Rack::BodyProxy.new([]) do body.close if body.respond_to? :close end ] else [status, headers, body] end end end end