[rt-devel] Tentative fix to attachment bug
Daniel E. Eisenbud
eisenbud at cbio.mskcc.org
Wed Apr 30 10:09:03 EDT 2003
On Wed, Apr 30, 2003 at 06:09:41PM +0800, Autrijus Tang <autrijus at autrijus.org> wrote:
> On Wed, Apr 30, 2003 at 01:56:41AM -0400, Daniel E. Eisenbud wrote:
> > I will leave the actual details of how the piece of perl on line 31 of
> > 3.0.2pre4 could produce the error in question, since I am hardly a perl
> > guru.
>
> I'd really like to see what does line 31 on your 3.0.2pre4's autohandler
> says. :-)
OK, now it is time for me to feel dumb. But still very puzzled, since I
haven't figured out in the slightest what was really going on. First of
all, the autohandler in question was really a 3.0.2pre4 autohandler, bog
standard. I swear up and down. I had replaced the 3.0.2pre3
autohandler with it, I had restarted apache in all conceivable ways, it
didn't fix anything. I had tried different web browsers. No luck
attaching things from the web form, with any attachment that I trid.
Then I replaced 3.0.2pre4's autohandler with 3.0.0's autohandler, and it
Just Worked. I'm pretty sure I didn't even restart apache before I
tried this the first time, though that was really late last night and I
unfortunately can't say for sure.
But now, of course, with 3.0.2pre4's autohandler in place again, it
continues to work, both before and after apache restart.
One obvious question is whether there's any chance for an old copy of
something like this to be cached by mod_perl? I would imagine that very
unlikely across an apache restart, but it's hard to think of other
explanations for what I saw. And I'm pretty sure that I'm not just
hallucinating.
Also, as several people seem to have mentioned, attaching files from the
jumbo form seems to just silently ignore the files, but I imagine that's
a different bug than the one we're talking about here.
-Daniel
P.S. Just for kicks, the answer to your original question is that line
31 of my autohandler is the third line of code below. It certainly
doesn't appear to have an array reference. I think it's clear that this
wasn't the problem.
my $type = ref($_);
(!$type)
? Encode::decode(utf8 => $_, Encode::FB_PERLQQ) :
($type eq 'ARRAY')
? [ map { ref($_) ? $_ : Encode::decode(utf8 => $_,
Encode::FB_PERLQQ) } @$_ ] :
($type eq 'HASH')
? { map { ref($_) ? $_ : Encode::decode(utf8 => $_,
Encode::FB_PERLQQ) } %$_ } : $_
} %ARGS;
More information about the Rt-devel
mailing list