Warning: Cannot modify header information - headers already sent (output started at includes/file.inc)

Created on 3 December 2013, almost 11 years ago
Updated 7 November 2023, 10 months ago

Location https://helix.wtgc.org/system/files/users/wtsi/a/ak2/library_branding/wt... (anonymous)

Message	Warning: Cannot modify header information - headers already sent by (output started at 
/www/htdocs/includes/file.inc:1965) in _drupal_session_delete_cookie() 
(line 466 of /www/www-live/drupal.sanger.ac.uk/htdocs/includes/session.inc).

function _drupal_session_delete_cookie($name, $secure = NULL) {
.....
466: setcookie($name, '', REQUEST_TIME - 3600, $params['path'], $params['domain'], $params['secure'], $params['httponly']);


function file_transfer($uri, $headers) {
......
  drupal_send_headers();
  $scheme = file_uri_scheme($uri);
  // Transfer file in 1024 byte chunks to save memory usage.
  if ($scheme && file_stream_wrapper_valid_scheme($scheme) && $fd = fopen($uri, 'rb')) {
    while (!feof($fd)) {
1965: print fread($fd, 1024);

Why is this cookie being deleted after the headers and file contents for a file download have been sent for an anonymous user?

🐛 Bug report
Status

Closed: outdated

Version

9.5

Component
File system 

Last updated 1 day ago

Created by

🇬🇧United Kingdom StephenRobinson

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇦🇺Australia mstrelan

    Is this still applicable for Drupal 9 and 10? If so, we need steps to reproduce, ideally with a failing test. We should update the issue summary to use the standard template also.

  • Status changed to Closed: outdated 10 months ago
  • 🇳🇿New Zealand quietone New Zealand

    More information on this was asked for 8 months ago, specifically if this is still a problem, and none has been supplied.

    Therefore, closing as outdated. If this is incorrect reopen the issue, by setting the status to 'Active', and add a comment explaining what still needs to be done.

    Thanks!

Production build 0.71.5 2024