Download Attachments results in Mason Error

Hi everybody,

I did not find any hints about that problem in the Mailing Lists or in
the Bugs Database: Whenever a user tries to download an attachment from
the web interface, RT generates a mason error like:

— cut here —

error in file: /usr/lib/perl5/5.6.0/Carp/
line 79: Bizarre copy of HASH in aassign

context: …
75: # them according to the format variables defined earlier in
76: # this file and join them onto the $sub sub-routine string
77: if ($hargs) {
78: # we may trash some of the args so we take a copy
79: @a = @DB::args; # must get local copy of args
80: # don’t print any more than $MaxArgNums
81: if ($MaxArgNums and @a > $MaxArgNums) {
82: # cap the length of $#a and set the last element to '…'
83: $#a = $MaxArgNums;

component stack: /Ticket/Attachment/dhandler [standard]
/autohandler [standard]

code stack: /usr/lib/perl5/5.6.0/Carp/

raw error:

error while executing /Ticket/Attachment/dhandler [standard]:
Bizarre copy of HASH in aassign at /usr/lib/perl5/5.6.0/Carp/
line 79, line 184.

— cut here —

The URL of the attachment (Ticket No #481) is pointing to:

It happend since installing 2-0-1 and now with 2-0-2test1, too.

Thanks for your help,



I could fix the error in rt-2-0-2test1 by commenting 1 line (at —>) in

— cut here —

my ($ticket, $trans,$attach, $filename);
my $arg = $m->dhandler_arg; # get rest of path
if ($arg =~ ‘^(\d+)/(\d+)’) {
$trans = $1;
$attach = $2;
else {
Abort(“Corrupted attachment URL.”);
my $AttachmentObj = new RT::Attachment($session{‘CurrentUser’});
$AttachmentObj->Load($attach) || Abort(“Attachment ‘$attach’ could
not be loaded”);

 unless ($AttachmentObj->id) {
    Abort("Bad attachment id. Couldn't find attachment

unless ($AttachmentObj->TransactionId() == $trans ) {
Abort(“Bad transaction number for attachment. $trans should
be”.$AttachmentObj->TransactionId() ."\n");

 my $content_type = $AttachmentObj->ContentType || 'text/plain';

–> # SetContentType($content_type);

— cut here —