> commit a52660a646012691f993cca821c00fe05cff08bb > Author: jaredj <jar...@nmgi.com> > Date: Wed Mar 25 07:38:05 2009 -0500 > > Spool body when $transaction->body_fh() is called > > Qpsmtpd::Transaction::body_filename() calls $self->body_spool() if > the message body has not already been spool to disk. This adds > the same check to Qpsmtpd::Transaction::body_fh() > > but I don't remember the background behind it. Jared, do you remember > why you changed this?
Looking at the history in our internal SVN history, it looks like this was part of an effort to "dup()" body_fh. IIRC this was because we were passing it to an external library that close()'d it but we don't want the original FH closed. BUT... at some point internally we noticed that this caused bugs! I don't remember what sort, but our commit log says it "confuses some methods of writing to the fh". So we reverted the changes to body_fh() and added a dup_body_fh() to do what we want: sub body_fh { return shift->{_body_file}; } sub dup_body_fh { my $self = shift; open ( my $fh, '<&=', $self->body_fh ); return $fh; } I guess by the time we discovered it was buggy I had forgotten I had submitted the buggy change upstream. Sorry! We only use dup_body_fh() in one place right now, so though adding such a function might be useful upstream, but I don't think there's any need to preserve the old, apparently undocumented, behavior; seems safe to just revert. -Jared