Module: Roda::RodaPlugins::Head::InstanceMethods

Defined in:
lib/roda/plugins/head.rb

Instance Method Summary collapse

Instance Method Details

#callObject

Always use an empty response body for head requests, with a content length of 0.



29
30
31
32
33
34
35
# File 'lib/roda/plugins/head.rb', line 29

def call(*)
  res = super
  if request.head?
    res[2] = []
  end
  res
end