Great Circle Associates Majordomo-Users
(July 1994)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: resend header bug
From: Alex Deacon - NAIC <awdeacon @ merlot . arc . nasa . gov>
Date: Fri, 08 Jul 1994 15:25:58 -0700
To: "John P. Rouillard" <rouilj @ cs . umb . edu>
Cc: colin sebastian roald <colin @ callisto . pas . rochester . edu>, majordomo-users @ greatcircle . com
In-reply-to: Your message of "Fri, 08 Jul 1994 17:43:42 EDT." <199407082143.AA01687@cs.umb.edu>

Collin, (and John)

> My guess is that it would be in the code that handles the approved
> header in the body of the message, but I am not sure. I tried running
> the test case by hand through the 1.92 resend with no luck. If anybody
> else tracks it down, I would appreciate looking at the patch so I can
> make sure that it is really fixed and not merely masked in the 1.93
> resend.

I *think* I patched a simillar problem I was having a couple of weeks
ago.  When an owner of a moderated list posted to the list with the
Approved: command in the BODY of the message, header information (such
as bulk, sender) was getting mixed in with the text of the message.
This header info was being inserted after the first (or second, I dont
remember) line of the message.  And for some reason the subject line
got blown away in the process also.  

This behaviour did not occur when the listowner placed the Approved:
command in the header of the message.  

I came up with the following patch (for 1.92), its a hack, and hasn't
been fully tested but it seems to be working well.  Basically the
header information looked like it was being rewritten when a valid
Approved line was detected, however if this Approved: line is in the
body of the message then there is no need to print the header info
again.

Comments?


*** resend.dist Fri Jun 17 08:55:59 1994
--- resend      Fri Jun 24 13:50:57 1994
***************
*** 153,159 ****
            }
        }
        if ($in_hdr) {
!           if (/^\s*$/) {
                # end of header; add new header fields
                print OUT "Sender: $sender\n";
                if (defined($opt_p)) {
--- 153,160 ----
            }
        }
        if ($in_hdr) {
!          # if (/^\s*$/) {  ####Original code  (awdeacon)
!           if (/^\s*$/ && ! $again) {   # added to fix Approved: bug
                # end of header; add new header fields
                print OUT "Sender: $sender\n";
                if (defined($opt_p)) {
***************
*** 256,265 ****
                    # Yes, it's a valid "Approved:" line...
                    # So, we start over
                    $restart = 1;
!                   close(OUT);
!                   unlink("/tmp/resend.$$.out");
!                   open(OUT, ">/tmp/resend.$$.out") ||
!                       die("resend: Can't open /tmp/resend.$$.out: $!");
                    last;
                }
            }
--- 257,267 ----
                    # Yes, it's a valid "Approved:" line...
                    # So, we start over
                    $restart = 1;
!                   $again = 1;        # part of fix by awdeacon
!                   #close(OUT);
!                   #unlink("/tmp/resend.$$.out");
!                   #open(OUT, ">/tmp/resend.$$.out") ||
!               #       die("resend: Can't open /tmp/resend.$$.out: $!");
                    last;
                }
            }



Follow-Ups:
References:
Indexed By Date Previous: Re: resend header bug
From: "John P. Rouillard" <rouilj@cs.umb.edu>
Next: Re: resend header bug
From: Larry Sheldon <lsheldon@bluejay.creighton.edu>
Indexed By Thread Previous: Re: resend header bug
From: "John P. Rouillard" <rouilj@cs.umb.edu>
Next: Re: resend header bug
From: Larry Sheldon <lsheldon@bluejay.creighton.edu>

Google
 
Search Internet Search www.greatcircle.com