module Roda::RodaPlugins::DeleteEmptyHeaders::ResponseMethods

def delelete_empty_headers(res)

Delete any empty headers from response
def delelete_empty_headers(res)
  res[1].delete_if{|_, v| v.is_a?(String) && v.empty?}
  res
end

def finish

Delete any empty headers when calling finish
def finish
  delelete_empty_headers(super)
end

def finish_with_body(_)

Delete any empty headers when calling finish_with_body
def finish_with_body(_)
  delelete_empty_headers(super)
end