Hello,

I have noticed there is no way to alter the content headers supplied by file_get_content_headers() in includes/file.inc

In my situation this was problematic for generated zip-files. For some unknown reason the Content-Length header made the zip-file corrupt after downloading through Drupal, while opening after directly downloading through SSH was no problem.

A small patch is included which adds a drupal_alter and documentation. I'm not sure if it's in the right place or perhaps there's a better solution, so please review.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jorisdejong’s picture

MrHaroldA’s picture

Status: Active » Needs review
cilefen’s picture

@jorisdejong See if Drupal 8 needs this too. If it does, it must go there first https://www.drupal.org/core/backport-policy. If not, carry on.