class Rack::Lint::Wrapper
def check_early_hints(env)
# The application or any middleware may call the rack.early_hints
#
# === Early Hints
#
def check_early_hints(env) if env[RACK_EARLY_HINTS] ## ## If <tt>rack.early_hints</tt> is present, it must respond to #call. unless env[RACK_EARLY_HINTS].respond_to?(:call) raise LintError, "rack.early_hints must respond to call" end original_callback = env[RACK_EARLY_HINTS] env[RACK_EARLY_HINTS] = lambda do |headers| ## If <tt>rack.early_hints</tt> is called, it must be called with ## valid Rack response headers. check_headers(headers) original_callback.call(headers) end end end