lib/roda/plugins/head.rb in roda-2.28.0 vs lib/roda/plugins/head.rb in roda-2.29.0
- old
+ new
@@ -35,17 +35,18 @@
# HEAD request prior to crawling a page with a GET request. Without
# this plugin those HEAD requests will return a 404 status, which
# may prevent search engine's from crawling your website.
module Head
EMPTY_ARRAY = [].freeze
+ RodaPlugins.deprecate_constant(self, :EMPTY_ARRAY)
module InstanceMethods
# Always use an empty response body for head requests, with a
# content length of 0.
def call(*)
res = super
if @_request.head?
- res[2] = EMPTY_ARRAY
+ res[2] = RodaPlugins::EMPTY_ARRAY
end
res
end
end