lib/rackful/resource.rb
Handles a HEAD request.

This default handler for HEAD requests calls {#http\_GET}, and
then strips off the response body.

Feel free to override this method at will.
@return [self]
Handles a HEAD request.
This default handler for HEAD requests calls {#http\_GET}, and
then strips off the response body.

Feel free to override this method at will.
Handles a HEAD request . This default handler for HEAD requests calls { #http \ _GET } and then strips off the response body . Feel free to override this method at will .
def http_HEAD request, response
    self.http_GET request, response
    response['Content-Length'] =
      response.body.reduce(0) do
        |memo, s| memo + bytesize(s)
      end.to_s
    response.body = []
  end
def http_HEAD request , response self . http_GET request , response response [ 'Content-Length' ] = response . body . reduce ( 0 ) do | memo , s | memo + bytesize ( s ) end . to_s response . body = [ ] end
Handles a HEAD request.
Handles a HEAD request .
# Is this really necessary? Doesn't Rack automatically strip the response # body for HEAD requests?
None
self
request
<not_specific>
response
<not_specific>