summaryrefslogtreecommitdiff
path: root/includes/file.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/file.inc')
-rw-r--r--includes/file.inc9
1 files changed, 3 insertions, 6 deletions
diff --git a/includes/file.inc b/includes/file.inc
index e61574501..58b3e1b20 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -1311,13 +1311,10 @@ function file_transfer($source, $headers) {
ob_end_clean();
}
- foreach ($headers as $header) {
- // To prevent HTTP header injection, we delete new lines that are
- // not followed by a space or a tab.
- // See http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
- $header = preg_replace('/\r?\n(?!\t| )/', '', $header);
- drupal_set_header($header);
+ foreach ($headers as $name => $value) {
+ drupal_set_header($name, $value);
}
+ drupal_send_headers();
$source = file_create_path($source);