module Sprockets::Server

def headers(env, asset, length)

def headers(env, asset, length)
  headers = {}
  # Set content length header
  headers["Content-Length"] = length.to_s
  # Set content type header
  if type = asset.content_type
    # Set charset param for text/* mime types
    if type.start_with?("text/") && asset.charset
      type += "; charset=#{asset.charset}"
    end
    headers["Content-Type"] = type
  end
  headers.merge(cache_headers(env, asset.etag))
end