If the devel module's query log is turned on, it is automatically appended to every torrent file that is downloaded.

This can be fixed by changing the end of bt_torrent_get_torrent() as follows:

...
      drupal_set_header('Content-Disposition: attachment; filename="'. $torrent->title .'.torrent"');
      print($torrent->metadata);
      
      $GLOBALS['devel_shutdown'] = FALSE;  // Added...
    }
...

Not sure whether this is the correct way of solving it, but it seems to be the only way short of modifying the devel module itself.

Comments

bradfordcp’s picture

Status: Active » Fixed

Fixed in beta3

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.